Repository navigation
fix(rccl): index topology GPUs by SMI index, not HIP ordinal #13536
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
+228
−86
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fa7a948
fix(rccl): index topology GPUs by SMI index, not HIP ordinal
amd-arozanov 4820613
fix(rccl): look up the XGMI clique by SMI index
amd-arozanov acbe1c7
test(rccl): run TopoGpuDev in the fixtures-debug test lists
amd-arozanov a504859
fix(rccl): fail topology fill if the GPU has no HIP ordinal
amd-arozanov 067c488
test(rccl): make the GPU dev tests fail on any multi-GPU host
amd-arozanov 83c921d
docs(rccl): drop the regression figure from the CHANGELOG entry
amd-arozanov 3dac7a3
test(rccl): exit asymmetric-visibility workers via _exit on success
amd-arozanov 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
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
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,50 @@ | ||
| /************************************************************************* | ||
| * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. | ||
| * | ||
| * See LICENSE.txt for license information | ||
| ************************************************************************/ | ||
|
|
||
| // Checks that the GPU nodes of a real topology carry the SMI index as `dev`, distinct per GPU. | ||
| // Needs at least two GPUs; on a host whose HIP order matches the SMI order it cannot fail. | ||
|
i-kosarev marked this conversation as resolved.
Resolved
|
||
|
|
||
| #include <gtest/gtest.h> | ||
| #include <rccl/rccl.h> | ||
|
|
||
| #include <set> | ||
| #include <vector> | ||
|
|
||
| #include "comm.h" | ||
| #include "graph/topo.h" | ||
| #include "../common/ProcessIsolatedTestRunner.hpp" | ||
|
|
||
| namespace RcclUnitTesting { | ||
|
|
||
| TEST(TopoGpuDev, OwnGpuDevIsNvmlDevAndUnique) | ||
| { | ||
| RUN_ISOLATED_TEST("TopoGpuDev_OwnGpuDevIsNvmlDevAndUnique", []() { | ||
| int numDevices = 0; | ||
| ASSERT_EQ(hipGetDeviceCount(&numDevices), hipSuccess); | ||
| if (numDevices < 2) GTEST_SKIP() << "Needs at least 2 GPUs"; | ||
|
|
||
| std::vector<ncclComm_t> comms(numDevices, nullptr); | ||
| ASSERT_EQ(ncclCommInitAll(comms.data(), numDevices, nullptr), ncclSuccess); | ||
|
i-kosarev marked this conversation as resolved.
Resolved
i-kosarev marked this conversation as resolved.
Resolved
|
||
|
|
||
| for (ncclComm_t comm : comms) { | ||
| const struct ncclTopoNodeSet& gpus = comm->topo->nodes[GPU]; | ||
| int ownDev = -1; | ||
| for (int gpuIndex = 0; gpuIndex < gpus.count; gpuIndex++) { | ||
| if (gpus.nodes[gpuIndex].gpu.rank == comm->rank) ownDev = gpus.nodes[gpuIndex].gpu.dev; | ||
| } | ||
| EXPECT_EQ(ownDev, comm->nvmlDev) << "rank " << comm->rank << " (HIP device " << comm->cudaDev << ")"; | ||
| } | ||
|
|
||
| const struct ncclTopoNodeSet& gpus = comms[0]->topo->nodes[GPU]; | ||
| std::set<int> devs; | ||
| for (int gpuIndex = 0; gpuIndex < gpus.count; gpuIndex++) devs.insert(gpus.nodes[gpuIndex].gpu.dev); | ||
| EXPECT_EQ(static_cast<int>(devs.size()), gpus.count) << "GPU nodes share a dev index"; | ||
|
|
||
| for (ncclComm_t comm : comms) EXPECT_EQ(ncclCommDestroy(comm), ncclSuccess); | ||
| }); | ||
| } | ||
|
|
||
| } // namespace RcclUnitTesting | ||
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.