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

# rccl-UnitTestsMicroBootstrap -- src/bootstrap.cc. Own binary: bootstrap_micro_fakes.cc replaces misc/socket.cc
# wholesale, and other binaries link bootstrap_stubs.cc for this unit's symbols.
set(TEST_MICRO_BOOTSTRAP_SOURCE_FILES
bootstrap-test.cc
fakes/bootstrap_micro_fakes.cc
fakes/env_fakes.cc
fakes/hip_fakes.cc
fakes/os_fakes.cc
${RCCL_HOST_HIPIFY_DIR}/src/misc/utils.cc
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroWarpSpeed -- scheduler UUTs under ENABLE_WARP_SPEED.
set(TEST_MICRO_SCHEDULER_SOURCE_FILES
scheduler-test.cc
Expand Down Expand Up @@ -943,6 +955,16 @@ endif()
# all targets -- no need to repeat it per binary.
rccl_mark_oracle_tus_generated(${RCCL_HOST_HIPIFY_DIR} argcheck archinfo utils)

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroBootstrap
# ---------------------------------------------------------------------------
rccl_add_micro_binary(rccl-UnitTestsMicroBootstrap
SOURCES ${TEST_MICRO_BOOTSTRAP_SOURCE_FILES}
EXTRA_DEFS
${_MICRO_MODE_DEFS}
BOOTSTRAP_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/bootstrap.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_bootstrap.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicro
# ---------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions projects/rccl/test/host/MICROTEST_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ export colliding non-`static` symbols; otherwise a unit needs its own binary:
tables, prime strides, Walecki, Walecki+greedy) and the load-balanced cut
selection in `findRingCutIndices`. `greedyRingGen`'s out-of-memory arm is
driven through the heap half of `fakes/libc_seam.h`.
- **`rccl-UnitTestsMicroBootstrap`**: `bootstrap.cc` (via `BOOTSTRAP_CC_PATH`, from
`bootstrap-test.cc`); suites `Bootstrap*Microtest.*`. Ranks run as threads over the
in-memory socket layer and net plugin in `fakes/bootstrap_micro_fakes.cc`. Its own binary
because those seams replace `misc/socket.cc` wholesale, and other binaries link
`bootstrap_stubs.cc` for this unit's symbols. See `test_categories_micro_bootstrap.yaml`.
- **`rccl-UnitTestsMicroEnqueue`** — `enqueue.cc` (via `ENQUEUE_CC_PATH`); suite
`EnqueueMicrotest.*`. All tests live in `enqueue-test.cc`, grouped by unit under
test; several fixtures are reused by later groups, so the order within the file
Expand Down Expand Up @@ -491,6 +496,7 @@ symbol.
| `src/algorithms/dda/*.cc` (targets that do not compile the real file) | `fakes/dda_fakes.cc` |
| `src/allocator.cc` | `fakes/allocator_fakes.cc` |
| `src/bootstrap.cc` | `fakes/bootstrap_stubs.cc` |
| externals `src/bootstrap.cc` reaches (`rccl-UnitTestsMicroBootstrap`, which compiles it) | `fakes/bootstrap_micro_fakes.cc` |
| `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` |
Expand Down Expand Up @@ -908,6 +914,7 @@ cd projects/rccl/test/host
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DRCCL_BUILD_DIR=/path/to/projects/rccl/build/release
cmake --build build -j"$(nproc)"
./build/rccl-UnitTestsMicroBootstrap # src/bootstrap.cc tests
./build/rccl-UnitTestsMicro # p2p tests, ldd shows no HIP/ROCm/HSA/RCCL
./build/rccl-UnitTestsMicroWarpSpeed # src/scheduler/*.cc tests
./build/rccl-UnitTestsMicroInit # init.cc tests
Expand Down
Loading
Loading