Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
24 changes: 24 additions & 0 deletions projects/rccl/test/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,15 @@ function(rccl_define_micro_source_lists)
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroDdaIpc -- src/algorithms/dda/all_reduce/dda_all_reduce_ipc.cu. Own binary:
# rccl-UnitTestsMicro links fakes/dda_fakes.cc, which defines the same ncclAllReduceDdaIpc* symbols.
set(TEST_MICRO_DDA_IPC_SOURCE_FILES
dda-allreduce-ipc-test.cc
fakes/hip_fakes.cc
fakes/nccl_fakes.cc
../common/main_altrsmi.cpp
PARENT_SCOPE)

# src/diagnostics/p2p.cc; fakes transport/p2p.cc, which rccl-UnitTestsMicro compiles.
set(TEST_MICRO_DIAGNOSTICS_SOURCE_FILES
diag-p2p-test.cc
Expand Down Expand Up @@ -863,6 +872,21 @@ rccl_add_micro_binary(rccl-UnitTestsMicroGinHost
GIN_HOST_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/gin/gin_host.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_gin_host.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroDdaIpc -- src/algorithms/dda/all_reduce/dda_all_reduce_ipc.cu
# ---------------------------------------------------------------------------
rccl_add_micro_binary(rccl-UnitTestsMicroDdaIpc
SOURCES ${TEST_MICRO_DDA_IPC_SOURCE_FILES}
EXTRA_DEFS
${_MICRO_MODE_DEFS}
DDA_ALL_REDUCE_IPC_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/algorithms/dda/all_reduce/dda_all_reduce_ipc.cu.cpp"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_dda_ipc.yaml")
# The TU defines __global__ kernels; an embedded (empty) GPU binary keeps clang from referencing an
# external __hip_fatbin_<cuid>. Registration itself is faked in fakes/hip_fakes.cc.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/empty_gpubinary" "")
target_compile_options(rccl-UnitTestsMicroDdaIpc PRIVATE
"SHELL:-Xclang -fcuda-include-gpubinary -Xclang ${CMAKE_CURRENT_BINARY_DIR}/empty_gpubinary")

# sym_kernels_host.cc only exists when sym kernels are generated (GENERATE_SYM_KERNELS
# in-build / present on disk standalone).
if(_MICRO_BUILD_SYM_KERNELS)
Expand Down
9 changes: 8 additions & 1 deletion projects/rccl/test/host/MICROTEST_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ export colliding non-`static` symbols; otherwise a unit needs its own binary:
`NCCL_GIN_PROXY_NTHREADS` progress-thread assignment. Its own binary, not
sharing `rccl-UnitTestsMicro`: `gin-plugin-init-test.cc` already defines
`ncclParamGinEnable` there. See `test_categories_micro_gin_host.yaml`.
- **`rccl-UnitTestsMicroDdaIpc`**: `algorithms/dda/all_reduce/dda_all_reduce_ipc.cu`
(`DDA_ALL_REDUCE_IPC_CC_PATH`, from `dda-allreduce-ipc-test.cc`); suites
`DdaAllReduceIpc*`. Eligibility gates, datatype dispatch and flat/tree kernel
selection, observed through the `g_hipExtLaunchKernel` seam. Its own binary:
`rccl-UnitTestsMicro` links `fakes/dda_fakes.cc`, which defines the same symbols.
See `test_categories_micro_dda_ipc.yaml`.
- **`rccl-UnitTestsMicroDiagnostics`**: `src/diagnostics/p2p.cc` (via
`DIAG_P2P_CC_PATH`, suite `DiagP2pMicrotest.*`) and `src/diagnostics/ib_write_bw.cc`
(via `DIAG_IB_WRITE_BW_CC_PATH`, suite `DiagIbWriteBwMicrotest.*`). Its own binary: it fakes the
Expand Down Expand Up @@ -773,7 +779,7 @@ above (`./install.sh -t`, wired via `add_subdirectory(host)`), the same file
can be configured **directly** to build every host binary — `rccl-HostUnitTests`,
`rccl-UnitTestsMicro`, `rccl-UnitTestsMicroWarpSpeed`,
`rccl-UnitTestsMicroInit[-uncached|-faultinj]`, `rccl-UnitTestsMicroEnqueue[-devlinker]`,
`rccl-UnitTestsMicroGinHost, `rccl-UnitTestsMicroDiagnostics`,
`rccl-UnitTestsMicroGinHost`, `rccl-UnitTestsMicroDdaIpc`, `rccl-UnitTestsMicroDiagnostics`,
`rccl-UnitTestsMicroSymKernels` and `rccl-UnitTestsMicroTaskPrep` — **without configuring/building all of
librccl**. It compiles just the tests + fakes + the hipified unit-under-test
sources.
Expand Down Expand Up @@ -814,6 +820,7 @@ cmake --build build -j"$(nproc)"
./build/rccl-UnitTestsMicroTaskPrep # src/enqueue/task_prep/ + task_sched/ tests
./build/rccl-UnitTestsMicroDiagnostics # src/diagnostics/{p2p,ib_write_bw}.cc tests
./build/rccl-UnitTestsMicroGinHost # src/gin/gin_host.cc GIN_PROXY_NTHREADS
./build/rccl-UnitTestsMicroDdaIpc # src/algorithms/dda/all_reduce/dda_all_reduce_ipc.cu
./build/rccl-UnitTestsMicroDiagnostics # src/diagnostics/p2p.cc tests
./build/rccl-HostUnitTests
```
Expand Down
Loading
Loading