Repository navigation
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add rocSHMEM header-ordering dependencies for rccl-UnitTestsMicroTaskPrep in both affected CMake target definitions.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Repairs the rocSHMEM-GIN test build by staging required headers, enforcing build ordering, and adding a missing fake. Two host micro-test targets still lack ordering dependencies.
Changes:
- Adds centralized rocSHMEM header-ordering logic.
- Applies GDA include paths and ordering to test and device-linker targets.
- Adds
ncclAllToAllGinSdmaEligiblefake.
| File | Description |
|---|---|
projects/rccl/test/host/fakes/wrap_fakes.cc |
Adds the missing all-to-all GIN fake. |
projects/rccl/test/host/CMakeLists.txt |
Adds ordering for host micro-tests. |
projects/rccl/test/CMakeLists.txt |
Adds GDA includes and test ordering. |
projects/rccl/CMakeLists.txt |
Includes the shared helper. |
projects/rccl/cmake/RocshmemHeaders.cmake |
Centralizes header-copy ordering. |
projects/rccl/cmake/DeviceLinker.cmake |
Uses the shared ordering helper. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
b8d5339 to
8a6c6d9
Compare
There was a problem hiding this comment.
ARGUS
Bottom line: Looks approval ready. The rccl-UnitTestsMicroTaskPrep edge from the last round is in; the one remaining note is a CI-coverage follow-up, not a change to this PR.
Comment @argus review to re-run, or @argus re-review after pushing.
|
@argus re-review |
|
@lfmeadow the current head ( |
8a6c6d9 to
dc9b434
Compare
A GIN build (`./install.sh -t --rocshmem-gin`) failed with 99 compile errors and never produced the test binaries. librccl.so itself was fine; every failure was in test/ and test/host/. Two independent causes, the second only reachable once the first is fixed. Include path. The rocSHMEM GDA headers are staged into include/nccl_device/gin/rocshmem_gda/ and include each other as "gda/...", so that directory has to be on the include path itself, not just its parent. rccl adds it (src/CMakeLists.txt) and re-exports it as an INTERFACE include directory, so test targets that link rccl inherit it. rccl-UnitTestsDevRuntime and the host micro-tests deliberately do not link rccl, yet still reach those headers through nccl_device.h, so they got neither -- 'gda/queue_pair_provider.hpp' file not found. Add it to RCCL_COMMON_INCLUDE_DIRS under ENABLE_ROCSHMEM_GIN, which covers both the test/ loop and the host micro-tests, and order those targets after copy_rocshmem_headers so they cannot race the build-time copy. That ordering covers all six host micro-test targets, including rccl-UnitTestsMicroTaskPrep: its task_posttuning.cc reaches gda/queue_pair_provider.hpp through dev_runtime.h -> nccl_device.h -> impl/gin__funcs.h -> gin/gin_device_api.h, since NCCL_GIN_ROCSHMEM_GDA_ENABLE defaults to 1 under ENABLE_ROCSHMEM_GIN and the target's NCCL_GIN_ANVIL_SDMA_ENABLE=0 closes only the anvil branch. The new ordering in the test/ loop also subsumes the existing inline guard on rccl-UnitTestsGinAnvilPlugin, which is in RCCL_TEST_EXECUTABLES, so that guard is removed. Missing fake. With the headers resolving, rccl-UnitTestsMicro then failed to link: rcclSelectAlltoAll calls ncclAllToAllGinSdmaEligible under ENABLE_ROCSHMEM_GIN, whose real definition lives in the device TU gin_alltoall_sdma.cu that this host-only binary does not compile. wrap_fakes.cc already stubs the two AllReduce GIN-SDMA entry points for exactly this reason; add the alltoall one alongside them, returning false so the selector keeps its non-GIN behaviour. Verified with clean builds both ways: --rocshmem-gin now completes with zero failures (was 99), and a plain build is unchanged.
Ten sites repeated the same three-line guard to order a target after copy_rocshmem_headers, seven of them added by the previous commit. The pattern is easy to get wrong by omission rather than by error: leaving it out does not fail the configure, it makes the target race the header copy, so the build succeeds or fails on 'gda/...' not found depending on scheduling. That is exactly how the test targets came to be missing it. Replace them with rccl_order_rocshmem_headers(), which absorbs both guards (GIN off, and target not yet created by src/) so call sites carry none, and gives the requirement one place to be explained.
dc9b434 to
8455f44
Compare
|
Closing as superseded: develop has since fixed the |

JIRA ID : LCOMPILER-2794
The rocSHMEM tests were missing required dependencies.
./install.sh -t --rocshmem-ginfails with 99 compile errors and produces no test binaries;librccl.soitself is fine.Test targets that do not link rccl inherit neither the
include/nccl_device/gin/rocshmem_gdainclude directory nor the ordering edgeagainst
copy_rocshmem_headers, yet they still reach those staged headersthrough
nccl_device.h. This adds both, plus a missingncclAllToAllGinSdmaEligiblefake.The second commit folds the ten copies of that ordering guard into
rccl_order_rocshmem_headers().Notes for review
One of five independent PRs replacing the closed #9763 and #12221. Orthogonal to
the other four.
Verified by
./install.sh -t --ninja --rocshmem-gin: 0 errors, with the orderingedges confirmed in the ninja graph for all six affected targets.
Update after review
Review caught one more target that needed the same ordering edge,
rccl-UnitTestsMicroTaskPrep. Itstask_posttuning.ccreachesgda/queue_pair_provider.hppviadev_runtime.h->nccl_device.h->impl/gin__funcs.h->gin/gin_device_api.h, becauseNCCL_GIN_ROCSHMEM_GDA_ENABLEdefaults to 1 underENABLE_ROCSHMEM_GIN(
gin_device_common.h:53-57) and the target'sNCCL_GIN_ANVIL_SDMA_ENABLE=0closes only the
anvil_sdmabranch. That makes seven affected targets, and theverification run above predates this addition.
I audited the rest for the same gap and found none. The test targets that
neither link rccl nor appear in
RCCL_TEST_EXECUTABLES--rccl-UnitTestsNetTelemetry,rccl-UnitTestsGinSdmaPolicy,rccl-UnitTestsGinSdmaAllGatherPolicy,rccl-UnitTestsGinSdmaAllGatherGpuandrccl-UnitTestsGinSdmaBroadcastPolicy-- include only${PROJECT_SOURCE_DIR}/src/includeand never receiveRCCL_COMMON_COMPILE_DEFS, soENABLE_ROCSHMEM_GINis never defined for them.The explicit guard on
rccl-UnitTestsGinAnvilPluginis also dropped: that targetis in
RCCL_TEST_EXECUTABLES, which the newforeachalready covers.