Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions projects/rccl/test/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ unset(_rccl_src_root)
set(RCCL_MICRO_TEST_SOURCES
p2p-test.cc
rma-proxy-progress-test.cc # RMA proxy inflight-request coverage
ras-test.cc # src/ras/ras.cc: complete host-side line coverage
ras-client-test.cc # src/ras/client.cc: libc-only seams, no HIP/nccl deps
group-test.cc
devcomm-test.cc
Expand Down Expand Up @@ -147,6 +148,7 @@ if(BUILD_TESTS)
# the build directory layout.
target_compile_definitions(rccl-UnitTestsMicro PRIVATE
P2P_CC_PATH="${PROJECT_BINARY_DIR}/hipify/src/transport/p2p_tmp.cc"
RAS_CC_PATH="${PROJECT_BINARY_DIR}/hipify/src/ras/ras.cc"
RAS_CLIENT_CC_PATH="${PROJECT_BINARY_DIR}/hipify/src/ras/client.cc"
RMA_PROXY_PROGRESS_CC_PATH="${PROJECT_BINARY_DIR}/hipify/src/rma/rma_proxy_progress.cc"
GROUP_CC_PATH="${PROJECT_BINARY_DIR}/hipify/src/group.cc"
Expand Down Expand Up @@ -827,13 +829,15 @@ target_include_directories(rccl-UnitTestsMicro PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${RCCL_HIPIFY_DIR}/src/devcomm # devcomm_v22902.h, included unqualified
${RCCL_INCLUDE_DIRS}
${RCCL_HIPIFY_DIR}/src/include/nccl_device # device.h includes rccl_ptr.h unqualified
)

target_compile_definitions(rccl-UnitTestsMicro PRIVATE
__HIP_PLATFORM_AMD__
NCCL_OS_LINUX
ROCM_VERSION=70000
P2P_CC_PATH="${RCCL_HIPIFY_DIR}/src/transport/p2p_tmp.cc"
RAS_CC_PATH="${RCCL_HIPIFY_DIR}/src/ras/ras.cc"
RAS_CLIENT_CC_PATH="${RCCL_HIPIFY_DIR}/src/ras/client.cc"
RMA_PROXY_PROGRESS_CC_PATH="${RCCL_HIPIFY_DIR}/src/rma/rma_proxy_progress.cc"
GROUP_CC_PATH="${RCCL_HIPIFY_DIR}/src/group.cc"
Expand All @@ -858,6 +862,9 @@ target_compile_definitions(rccl-UnitTestsMicro PRIVATE
# surface (fakes/wrap_fakes.cc) is large and mostly unreached by
# these tests; this drops the unreferenced deep deps, matching
# rccl-UnitTestsMicroInit's rationale for the same flag.
# Section GC can also hide an uncalled function's coverage mapping, so a
# whole-file claim must confirm that ras.cc's linked function inventory still
# matches its compiled source inventory.
target_link_options(rccl-UnitTestsMicro PRIVATE -no-hip-rt -no-pie -Wl,--gc-sections)
target_link_libraries(rccl-UnitTestsMicro PRIVATE
GTest::GTest
Expand Down
10 changes: 10 additions & 0 deletions projects/rccl/test/host/MICROTEST_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ export colliding non-`static` symbols; otherwise a unit needs its own binary:
`#ifdef ENABLE_WARP_SPEED` cluster (~10 functions) is compiled out of
this binary entirely, so no seam can reach it without changing the
binary's own build configuration.
- `ras/ras.cc` (`RAS_CC_PATH`, from `ras-test.cc`); suite
`RasMicrotest.*`. The suite covers every executable line and function in
Comment thread
aduforest marked this conversation as resolved.
Resolved
`ras.cc`: communicator setup and cleanup, local notifications, message
allocation and transfer, connection handshakes, message dispatch, the poll
loop, timeout handling, and poll-slot management. External socket, network,
and neighboring subsystem calls use test-controlled replacements in
`ras-test.cc`, their sole consumer. Real multi-process behavior remains
integration-test territory. Since this binary uses section GC, validate
completeness by checking that the linked coverage report still contains
the same `ras.cc` function inventory as the compiled source.
- `ras/client.cc` (`RAS_CLIENT_CC_PATH`, from `ras-client-test.cc`); suite
`RasClientMicrotest.*`. With
`NCCL_RAS_CLIENT` defined, `ras_internal.h` reduces to four macros, so this
Expand Down
Loading
Loading