Repository navigation
feat(rccl/gin): enable rocSHMEM GDA alongside other GIN backends #14219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alex-breslow-amd
merged 15 commits into
develop
from
users/dondai/aicomrccl-3418-gda-alongside
Nov 10, 2026
Merged
Changes from 2 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c6dbbfe
feat(rccl/gin): enable rocSHMEM GDA alongside other GIN backends
dlamd1dai 79a372a
test(rccl/gin): cover rocSHMEM GDA alongside Anvil SDMA and the proxy
dlamd1dai 46c7fda
fix(rccl/gin): address ARGUS review on NCCL_GIN_TYPES CI coverage
dlamd1dai d8ef52f
style(rccl/gin): shorten NCCL_GIN_TYPES comments per ARGUS review
dlamd1dai 85a839c
Merge remote-tracking branch 'upstream/develop' into users/dondai/aic…
dlamd1dai 137f0eb
Merge remote-tracking branch 'upstream/develop' into users/dondai/aic…
dlamd1dai d9798cc
Merge remote-tracking branch 'upstream/develop' into users/dondai/aic…
dlamd1dai ba55da2
refactor(rccl/gin): rename NCCL_GIN_TYPES to RCCL_GIN_TYPE_LIST
dlamd1dai 8f4bf8b
feat(rccl/gin): request the SDMA backend explicitly in built-in SDMA …
dlamd1dai 054b3cd
Revert "feat(rccl/gin): request the SDMA backend explicitly in built-…
dlamd1dai f7ab571
Reapply "feat(rccl/gin): request the SDMA backend explicitly in built…
dlamd1dai 22bb53b
Merge branch 'develop' into users/dondai/aicomrccl-3418-gda-alongside
dlamd1dai 77782ff
Merge remote-tracking branch 'upstream/develop' into users/dondai/aic…
dlamd1dai 9d23431
[rccl] GIN: treat empty NCCL_GIN_TYPE as unset, bound RCCL_GIN_TYPE_L…
dlamd1dai 3b39e40
Merge remote-tracking branch 'upstream/develop' into users/dondai/aic…
dlamd1dai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| /************************************************************************* | ||
| * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. | ||
| * | ||
| * See LICENSE.txt for license information | ||
| ************************************************************************/ | ||
|
|
||
| #ifndef RCCL_GIN_TYPE_ENV_H_ | ||
| #define RCCL_GIN_TYPE_ENV_H_ | ||
|
|
||
| #include <cerrno> | ||
| #include <cstdint> | ||
| #include <cstdlib> | ||
|
|
||
| // NCCL_GIN_TYPE forces exactly one GIN backend. When it is unset, NCCL_GIN_TYPES | ||
| // (RCCL-only) is a comma-separated list of the backend types allowed to be active | ||
| // together, e.g. "6,7" for rocSHMEM GDA alongside Anvil SDMA. With neither set, | ||
| // each backend keeps its default: rocSHMEM GDA stays off, the others stay on. | ||
| // | ||
| // Both are read with getenv() on every call, not through NCCL_PARAM, whose cached | ||
| // value would ignore a later setenv() from the plugin tests. | ||
|
|
||
| // Parses list into a bitmask of GIN types (bit t set for type t). Returns false if | ||
| // any entry is not an integer in [1, 63]; valid entries are still recorded in *mask. | ||
| static inline bool ncclGinParseTypeList(const char* list, uint64_t* mask) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This new file would be a target for elimination if we can reuse the existing infra for parsing string-based lists (e.g. from GIN_PLUGINS). Defer to string-based list. |
||
| bool valid = true; | ||
| *mask = 0; | ||
| const char* p = list; | ||
| while (*p) { | ||
| while (*p == ' ' || *p == '\t') p++; | ||
| char* end = nullptr; | ||
| errno = 0; | ||
| long type = strtol(p, &end, 10); | ||
| while (*end == ' ' || *end == '\t') end++; | ||
| if (end == p || errno != 0 || type < 1 || type > 63 || (*end != ',' && *end != '\0')) { | ||
| valid = false; | ||
| while (*end != ',' && *end != '\0') end++; | ||
| } else { | ||
| *mask |= (uint64_t)1 << type; | ||
| } | ||
| p = (*end == ',') ? end + 1 : end; | ||
| } | ||
| return valid; | ||
| } | ||
|
|
||
| // Returns true and fills *mask when NCCL_GIN_TYPE is unset and NCCL_GIN_TYPES names | ||
| // at least one valid type. Otherwise the list does not apply. | ||
| static inline bool ncclGinTypeListMask(uint64_t* mask) { | ||
| if (getenv("NCCL_GIN_TYPE")) return false; | ||
| const char* list = getenv("NCCL_GIN_TYPES"); | ||
|
Kapil-Shyam-Pawar marked this conversation as resolved.
Resolved
|
||
| if (!list) return false; | ||
| ncclGinParseTypeList(list, mask); | ||
| return *mask != 0; | ||
| } | ||
|
|
||
| // Whether the backend of the given type may initialize. enabledByDefault is its | ||
| // behavior when neither NCCL_GIN_TYPE nor a usable NCCL_GIN_TYPES is set. | ||
| static inline bool ncclGinTypeEnabled(int type, bool enabledByDefault) { | ||
| const char* single = getenv("NCCL_GIN_TYPE"); | ||
| if (single) return atoi(single) == type; | ||
| uint64_t mask; | ||
| if (ncclGinTypeListMask(&mask)) return (mask >> type) & 1; | ||
| return enabledByDefault; | ||
| } | ||
|
|
||
| #endif // RCCL_GIN_TYPE_ENV_H_ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.