Repository navigation
refactor(rccl/gin): Simplify build for gin-anvil and remove sdma-induced rocshmem link dependencies - #11757
Conversation
to rocshmem (link dependencies induced by GDA remains TBD)
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: ROCSHMEM_SOURCE_DIR is empty at src/CMakeLists.txt:876 and never reaches the top-level scope at CMakeLists.txt:833, so anvil.cpp is not compiled in and the SDMA headers are not installed.
Comment @argus review to re-run, or @argus re-review after pushing.
Build system fixes:
- [1] Move target_sources(anvil.cpp) after add_rocshmem_targets() so
ROCSHMEM_SOURCE_DIR is set for raw cmake builds without install.sh
- [2] Use CACHE INTERNAL for ROCSHMEM_SOURCE_DIR in ROCSHMEM.cmake so
the top-level install rules can see it (no PARENT_SCOPE chain needed)
- [3] Fix anvil.cpp include path: ${CMAKE_CURRENT_SOURCE_DIR}/gin (not
src/gin) so log.hpp shim shadows rocshmem's log.hpp correctly
- [7] Add missing #include <cstdint> in gda_enums.hpp for uint32_t
Test fixes:
- [4] Compile gin_anvil_sdma_factory.cc + anvil.cpp directly into the
factory test (self-contained, no librccl.so link, no visibility attr)
- [5] Add EnvVars.cpp and #include <new> for placement new
- [9] Fix null-pointer UB in Create_NullOutParams: call factory API
directly instead of dereferencing nullptr through tryCreate helper
- Rename Create_MultiRankMock -> Create_MultiChannel (4-ch loopback);
cross-device multi-rank needs RCCL's full init path
- Replace memset on ncclComm with placement new (non-trivially copyable)
- Fix hipError_t nodiscard warnings in plugin test stubs
- Use hipified debug.h (not src/include) to avoid cudaError_t in HIP
CI fixes:
- [8] Fix factory test path in gin.sbatch (${rccl_build}/test/ not
build/test/) and add rocm_sysdeps to LD_LIBRARY_PATH
Cleanup:
- Remove stale ibverbs find_library from Findrocshmem_static.cmake
- install.sh: skip -DROCSHMEM_SOURCE_DIR in monorepo to exercise
cmake auto-detect path
Bracketed numbers [N] reference amd-argus bot review comments.
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: rccl-UnitTestsGinAnvilSdmaFactory has no rocSHMEM build include dir, so gin_anvil_sdma_factory.cc pulls rocSHMEM's real log.hpp and its generated rocshmem_config.h, and the target does not compile.
Comment @argus review to re-run, or @argus re-review after pushing.
…11757 Build fixes: - [10] Remove vestigial #include "log.hpp" from anvil_device.hpp — no LOGD_* macros remain after earlier cleanup, so the transitive include chain (factory.cc → anvil.hpp → anvil_device.hpp → log.hpp) no longer pulls in rocshmem's log.hpp during librccl.so compilation - [11] Add missing #include <cstdlib> in src/gin/log.hpp installed-context fallback — abort() requires it, <cstdio> alone is not sufficient Test fixes: - [8b] Add add_dependencies(rccl-UnitTestsGinAnvilSdmaFactory hipify_all) so hipified debug.h exists before the test compiles - [8c] Fix stale comment: factory test is self-contained (compiles sources directly), does NOT link librccl.so Dismissed: - [9] gin_anvil_sdma_get_num_channels returns the clamped value — test intentionally verifies clamping, not actual HW channel count Bracketed numbers [N] reference amd-argus bot review comments (round 2). Co-Authored-By: Claude <noreply@anthropic.com>
|
@argus re-review |
There was a problem hiding this comment.
ARGUS
Findings
1 finding(s) that could not be posted as inline comments
projects/rccl/src/gin/log.hpp:17(Low) The debug.h arm calls abort() without including <cstdlib>abort()on lines 19 and 20 is declared in<cstdlib>, but this arm includes onlydebug.h, whose own includes are nccl.h, nccl_common.h,<stdio.h>, compiler.h and<thread>. None of those is required to declare it; the#elsearm gets this right at line 31. It compiles today only because anvil.cpp includes anvil.hpp, and its<iostream>, first.
Bottom line: Worth settling before approval: gin.sbatch:239 expands rccl_build outside the subshell that sets it, so set -u kills the job before step 7 and the existing GIN suite stops running too.
Comment @argus review to re-run, or @argus re-review after pushing.
…11757 log.hpp fixes: - [r4037446399] LOG_ERROR_EXIT now calls exit(EXIT_FAILURE) matching rocshmem's semantics; LOG_ERROR_ABORT remains abort() - [r4037446287/17] Add #include <cstdlib> in debug.h arm for abort()/exit() - [r4037446410] Remove log.hpp from install rule — anvil_device.hpp no longer includes it, so the __has_include("debug.h") hazard is eliminated for installed consumers Factory header: - [r4043798119/r4037446331] Restore doxygen from the deleted rocshmem header: allgather contract, num_channels clamping, output handle indexing Test fixes: - [r4037446382] SetUp: guard hipGetDeviceCount against hipErrorNoDevice so validation tests still run on no-GPU hosts - [r4037446391] Mock allgather: pass nRanks via context pointer (the factory passes sizeof(int) as bytes_per_rank, not the buffer total — nRanks cannot be derived from it); add mockCtx() helper, tryCreate() auto-wires the context from its nRanks argument - [r4037446356] Remove orphaned gin_anvil_sdma_factory_test.cpp from rocshmem (moved to rccl/test/gin/GinAnvilSdmaFactory_test.cpp) CI fixes: - [r4037446372] Remove --tests_build from install.sh invocation — the comment explains the hipify race; build factory test via the existing second-step cmake reconfigure (BUILD_TESTS=ON, GIN_ANVIL_UNIT_TESTS=ON) - [r4037446361/r4037446375] Source env files (rocm/ompi/rocshmem/rccl) once before test steps so ROCM_PATH etc. are available outside the build subshell Dismissed: - [r4037446406] LOG_INFO asymmetry between arms is intentional - [r4037446420] LOGD stubs retained for future GDA device code use Bracketed IDs reference GitHub discussion comment IDs. Co-Authored-By: Claude <noreply@anthropic.com>
|
@argus re-review |
…rccl-gin/sdma-build-simplification
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: gin.sbatch:244 expands rccl_build, which is only set inside the build subshell, so under set -u the job dies at step 6 and the GIN tests never run.
Comment @argus review to re-run, or @argus re-review after pushing.
Co-authored-by: amd-argus[bot] <321830313+amd-argus[bot]@users.noreply.github.com>
when linking sdma
alex-breslow-amd
left a comment
There was a problem hiding this comment.
Accept with nits
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: gin.sbatch step 6 swallows the factory test's exit status, so a failing run leaves no tests-failed sentinel and the check stays green.
Comment @argus review to re-run, or @argus re-review after pushing.
…rccl-gin/sdma-build-simplification Conflicts resolved: - src/CMakeLists.txt: keep both Omri's QP header copy list and our anvil.cpp comment; take Omri's rocshmem header copy block wholesale - gin_rocshmem_gda_factory.cc: keep gda_enums.hpp include (needed for GDAProvider and gda::vendor_id), remove duplicate - topology.hpp: take develop (macros moved to .cpp by Omri's refactor) - gda_enums.hpp: remove dead GDA_*_VENDOR_ID constants superseded by Omri's gda::vendor_id enum class - gin_anvil_sdma_factory.cc: replace (void)hipFree with checkHip() Also: - wrap_fakes.cc: add missing ncclAllToAllGinSdmaEligible stub (develop added the call in rccl_wrap.cc but no micro-test fake existed)
sdma refactors that went on concurrently
ddebonis-amd
left a comment
There was a problem hiding this comment.
Changes are direct remapping with no functional changes and looks correct.
omor1
left a comment
There was a problem hiding this comment.
We definitely want GDA and SDMA to be using the same log.hpp header.
Before approving, I also want to sync up and establish a plan for how we finish removing the link dependency on rocSHMEM and reconcile the different approaches used for GDA and SDMA.
…A plugin test stubs Co-Authored-By: Claude <noreply@anthropic.com>
device code in nccl_device, only host code in gin/log.hpp, no spillage of unqualified include in user code.
TheRock Submodule Bump ActivityNewest first
|
Motivation
Simplify consumer code linkage by not requiring linking rocshmem from rccl clients. This remove the SDMA induced link requirements (GDA requirements remain)
Technical Details
Files that are ingested from rocshmem sources are installed in the rccl install, or compiled directly inside rccl as needed. No rocshmem linkage required.
Issue Tracking
JIRA ID : AICOMRCCL-1467
Test Plan
dev build and run
GIN CI
Test Result
Can build rccl, rccl-tests on rocm 10.1 nightly
Can run rccl-tests alltoall sdma
Submission Checklist