Skip to content
Closed
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
36 changes: 36 additions & 0 deletions projects/rccl/test/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,31 @@ function(rccl_define_micro_source_lists)
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroCftDevRuntime -- src/cft_dev_runtime.cc + src/nccl_device/core.cc. Own
# binary: rccl-UnitTestsMicro fakes most of core.cc, which the LE-info queries call.
set(TEST_MICRO_CFT_DEV_RUNTIME_SOURCE_FILES
cft-dev-runtime-test.cc
fakes/cft_dev_runtime_fakes.cc
fakes/bootstrap_stubs.cc
fakes/topo_stubs.cc
fakes/transport_stubs.cc
fakes/nccl_stubs.cc
fakes/nccl_fakes.cc
fakes/hip_fakes.cc
fakes/collectives_fakes.cc
fakes/comm_fakes.cc
fakes/dev_runtime_fakes.cc
fakes/env_fakes.cc
fakes/os_fakes.cc
fakes/recorder_fakes.cc
fakes/strongstream_stubs.cc
fakes/tuning_fakes.cc
${RCCL_HOST_HIPIFY_DIR}/src/misc/argcheck.cc
${RCCL_HOST_HIPIFY_DIR}/src/misc/archinfo.cc
${RCCL_HOST_HIPIFY_DIR}/src/misc/utils.cc
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroSymKernels -- REAL src/sym_kernels.cc + generated host TU.
set(TEST_MICRO_SYM_KERNELS_SOURCE_FILES
sym-kernels-test.cc
Expand Down Expand Up @@ -1055,6 +1080,17 @@ rccl_add_micro_binary(rccl-UnitTestsMicroClientSupport
CLIENT_SUPPORT_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/ras/client_support.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroCftDevRuntime
# ---------------------------------------------------------------------------
rccl_add_micro_binary(rccl-UnitTestsMicroCftDevRuntime
SOURCES ${TEST_MICRO_CFT_DEV_RUNTIME_SOURCE_FILES}
EXTRA_DEFS
${_MICRO_MODE_DEFS}
CORE_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/nccl_device/core.cc"
CFT_DEV_RUNTIME_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/cft_dev_runtime.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_cft_dev_runtime.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroSymKernels
# ---------------------------------------------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions projects/rccl/test/host/MICROTEST_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ export colliding non-`static` symbols; otherwise a unit needs its own binary:
guard-less positional pair `libc_seam.h` / `libc_seam_undef.h` must bracket
the production source include, after system headers and before test
helpers. CMake pins the copied `ncclFuncStr` table to `src/init.cc`.
- **`rccl-UnitTestsMicroCftDevRuntime`**: `src/cft_dev_runtime.cc` and
`src/nccl_device/core.cc` (via `CFT_DEV_RUNTIME_CC_PATH` / `CORE_CC_PATH`,
from `cft-dev-runtime-test.cc`); suites `CftDevRuntime*`. Its own binary because
`rccl-UnitTestsMicro` fakes most of `core.cc`, which the LE-info queries call. See
`test_categories_micro_cft_dev_runtime.yaml`.
- **`rccl-UnitTestsMicroSymKernels`** — the REAL `src/sym_kernels.cc` (via
`SYM_KERNELS_CC_PATH`, from `sym-kernels-test.cc`), compiled together with the
GENERATED `sym_kernels_host.cc` it calls into; suites `SymKernelMicrotest.*`,
Expand Down Expand Up @@ -442,6 +447,7 @@ symbol.
| `src/ce_coll.cc` (targets that do not compile the real file) | `fakes/ce_fakes.cc` |
| `src/collectives.cc` | `fakes/collectives_fakes.cc` |
| `src/dev_runtime.cc` (targets that do not compile the real file) | `fakes/dev_runtime_fakes.cc` |
| `src/dev_runtime.cc` callees of `src/cft_dev_runtime.cc` (`rccl-UnitTestsMicroCftDevRuntime`) | `fakes/cft_dev_runtime_fakes.cc` |
| `src/diagnostics.cc` (`ncclDiagChildRun*` external-tool runners) | `fakes/diagnostics_fakes.cc` |
| `src/diagnostics/device/p2p.cu` (`ncclDiagP2p*` kernel launchers) | `fakes/diagnostics_p2p_device_fakes.cc` |
| `src/graph/*.cc` (topo, paths, search, connect, rome consensus) | `fakes/topo_stubs.cc` |
Expand Down Expand Up @@ -829,6 +835,7 @@ can be configured **directly** to build every host binary — `rccl-HostUnitTest
`rccl-UnitTestsMicro`, `rccl-UnitTestsMicroWarpSpeed`,
`rccl-UnitTestsMicroInit[-uncached|-faultinj]`, `rccl-UnitTestsMicroEnqueue[-devlinker]`,
`rccl-UnitTestsMicroGinHost`, `rccl-UnitTestsMicroCe`, `rccl-UnitTestsMicroDiagnostics`,
`rccl-UnitTestsMicroCftDevRuntime`,
`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 @@ -869,6 +876,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-UnitTestsMicroCftDevRuntime # cft_dev_runtime.cc tests
./build/rccl-UnitTestsMicroDiagnostics # src/diagnostics/p2p.cc tests
./build/rccl-UnitTestsMicroCe # src/ce_coll.cc tests
./build/rccl-HostUnitTests
Expand Down
Loading
Loading