Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
192abf0
test(rccl): add host microtests for debug.cc
aduforest Oct 15, 2026
b1c93d3
test(rccl): add host microtests for misc/api_trace.cc
aduforest Oct 15, 2026
e179c1f
test(rccl): add host microtests for misc/recorder.cc
aduforest Oct 15, 2026
0ba29dc
test(rccl): add host microtests for misc/latency_profiler
aduforest Oct 15, 2026
0312f49
test(rccl): add host microtests for commDump.cc and timer.h
aduforest Oct 15, 2026
e85cf00
test(rccl): skip assert-only recorder parse tests under NDEBUG, trim …
aduforest Oct 15, 2026
3fe1868
test(rccl): share a recording ncclDebugLog fake, tidy review nits
aduforest Oct 15, 2026
a1a1a3b
test(rccl): fix in-build links of the Debug and ApiTrace microtests
aduforest Oct 15, 2026
15ef633
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 16, 2026
8e97c91
test(rccl): KnownBug_ pins and an eight-rank CollTrace fake
aduforest Oct 16, 2026
57fbe78
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 19, 2026
5211ad4
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 19, 2026
5dd1a04
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 19, 2026
037b96c
test(rccl): reuse shared fakes in the debug/trace/recorder microtests
aduforest Oct 19, 2026
af606a6
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 20, 2026
46dcf8b
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 20, 2026
b696bb7
test(rccl): host-only suites declare num_gpus 0
aduforest Oct 21, 2026
6937cdd
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 21, 2026
ce094c8
test(rccl): pin coll-trace and comm-dump paths by behaviour per review
aduforest Oct 21, 2026
cd1363d
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 22, 2026
db300a1
test(rccl): fix CollTrace ppc64le link, NVTX-off arm and recorder UB …
aduforest Oct 22, 2026
c717367
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 22, 2026
4e3dd5a
test(rccl): drop KnownBug pins for bugs closed as won't-do
aduforest Oct 22, 2026
4f7c2d1
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 24, 2026
083ef57
test(rccl): check the CollTrace worker loop by its queries per review
aduforest Oct 24, 2026
9fa5834
test(rccl): leave ci-precheckin.json to develop
aduforest Oct 24, 2026
462ee05
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 26, 2026
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
79 changes: 79 additions & 0 deletions projects/rccl/test/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ function(rccl_define_micro_source_lists)
tuning-general-test.cc
csv-tuner-test.cc # src/plugin/tuner/csv_tuner.cc
param-utils-test.cc # src/include/param/utils.h, src/include/param/parser_common.h
comm-dump-test.cc # src/commDump.cc
timer-test.cc # src/include/timer.h
ras-client-test.cc
group-test.cc
devcomm-test.cc
Expand Down Expand Up @@ -422,6 +424,37 @@ function(rccl_define_micro_source_lists)
fakes/transport_p2p_fakes.cc # src/transport/p2p.cc shareable buffers
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroDebug -- src/debug.cc. Own binary: it is the real ncclDebugLog, which
# every shared fake set also defines.
set(TEST_MICRO_DEBUG_SOURCE_FILES
debug-test.cc
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroApiTrace -- src/misc/api_trace.cc. Own binary: it defines the public
# NCCL_API entry points that fakes/api_trace_fakes.cc supplies elsewhere.
set(TEST_MICRO_API_TRACE_SOURCE_FILES
api-trace-test.cc
fakes/debug_fakes.cc
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroRecorder -- src/misc/recorder.cc. Own binary: it is the real
# rccl::Recorder, which fakes/recorder_fakes.cc supplies elsewhere.
set(TEST_MICRO_RECORDER_SOURCE_FILES
recorder-test.cc
fakes/debug_fakes.cc
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroCollTrace -- src/misc/latency_profiler/*.cc. Own binary: its ncclDebugLog,
# HIP event and bootstrap seams would collide with the shared fakes.
set(TEST_MICRO_COLL_TRACE_SOURCE_FILES
coll-trace-test.cc
fakes/debug_fakes.cc
../common/main_altrsmi.cpp
PARENT_SCOPE)
endfunction()

# Create one host-only micro-test binary and apply all the boilerplate that
Expand Down Expand Up @@ -918,6 +951,7 @@ rccl_add_micro_binary(rccl-UnitTestsMicro
RAS_PEERS_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/ras/peers.cc"
RAS_DIAGNOSTICS_ENV_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/ras/diagnostics_env.cc"
RAS_PARAM_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/ras/ras_param.cc"
COMM_DUMP_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/commDump.cc"
# graph/tuning.cc keeps the basename, so add_file_unique() renames this one.
TUNING_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/tuning/tuning_tmp.cc"
TUNING_GENERAL_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/tuning/tuning_general.cc"
Expand Down Expand Up @@ -1115,6 +1149,51 @@ 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-UnitTestsMicroDebug
# ---------------------------------------------------------------------------
rccl_add_micro_binary(rccl-UnitTestsMicroDebug
SOURCES ${TEST_MICRO_DEBUG_SOURCE_FILES}
EXTRA_DEFS
${_MICRO_MODE_DEFS}
DEBUG_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/debug.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_debug.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroApiTrace
# ---------------------------------------------------------------------------
rccl_add_micro_binary(rccl-UnitTestsMicroApiTrace
SOURCES ${TEST_MICRO_API_TRACE_SOURCE_FILES}
# The rocprofiler-register branch would need librocprofiler-register; keep the standalone config.
REMOVE_DEFS RCCL_ROCPROFILER_REGISTER=1
Comment thread
aduforest marked this conversation as resolved.
Resolved
EXTRA_DEFS
${_MICRO_MODE_DEFS}
API_TRACE_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/misc/api_trace.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_api_trace.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroRecorder
# ---------------------------------------------------------------------------
rccl_add_micro_binary(rccl-UnitTestsMicroRecorder
SOURCES ${TEST_MICRO_RECORDER_SOURCE_FILES}
EXTRA_DEFS
${_MICRO_MODE_DEFS}
RECORDER_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/misc/recorder.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_recorder.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroCollTrace
# ---------------------------------------------------------------------------
rccl_add_micro_binary(rccl-UnitTestsMicroCollTrace
SOURCES ${TEST_MICRO_COLL_TRACE_SOURCE_FILES}
EXTRA_DEFS
${_MICRO_MODE_DEFS}
COLL_TRACE_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/misc/latency_profiler/CollTrace.cc"
COLL_TRACE_EVENT_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/misc/latency_profiler/CollTraceEvent.cc"
COLL_TRACE_FUNC_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/misc/latency_profiler/CollTraceFunc.cc"
COLL_TRACE_UTILS_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/misc/latency_profiler/CollTraceUtils.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_coll_trace.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroSymKernels
# ---------------------------------------------------------------------------
Expand Down
28 changes: 28 additions & 0 deletions projects/rccl/test/host/MICROTEST_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ export colliding non-`static` symbols; otherwise a unit needs its own binary:
chain; the rest of `src/param/*` and `src/include/param/*.h` (the typed
registry, the remaining parsers, the C API, and env loading) are covered
by its follow-ups.
- `commDump.cc` (`COMM_DUMP_CC_PATH`, from `comm-dump-test.cc`); suite
`CommDumpMicrotest.*`. Defines `ncclProfilerProxyTraceDumpIfAny`.
- `include/timer.h` built with `ENABLE_TIMER`, from `timer-test.cc`; suite
`TimerMicrotest.*`. Header-only, no `_CC_PATH` macro needed.
- `misc/gdr_probe.cc` (`GDR_PROBE_CC_PATH`, from `gdr-probe-test.cc`); suite
`GdrProbeTest.*`. Covers `ncclIbProbeGdrSupport`, the runtime GPU
memory-registration fallback behind the sysfs peer-memory scan: the result
Expand Down Expand Up @@ -337,6 +341,23 @@ export colliding non-`static` symbols; otherwise a unit needs its own binary:
`ncclRmaProxyCreateContext` / `ncclRmaProxyDestroyContext` -- so production
owns the context and its cleanup. See `test_categories_micro_rma_proxy.yaml`.

- **`rccl-UnitTestsMicroDebug`** — `debug.cc` (via `DEBUG_CC_PATH`, from
Comment thread
aduforest marked this conversation as resolved.
Resolved
`debug-test.cc`); suite `Debug*`. Its own binary because it is the real
`ncclDebugLog`, which every shared fake set also defines. See
`test_categories_micro_debug.yaml`.
- **`rccl-UnitTestsMicroApiTrace`** — `misc/api_trace.cc` (via `API_TRACE_CC_PATH`,
from `api-trace-test.cc`); suite `ApiTrace*`. Its own binary because it defines
the public `NCCL_API` entry points that `fakes/api_trace_fakes.cc` supplies
elsewhere. See `test_categories_micro_api_trace.yaml`.
- **`rccl-UnitTestsMicroRecorder`** — `misc/recorder.cc` (via `RECORDER_CC_PATH`,
from `recorder-test.cc`); suite `Recorder*`. Its own binary because it is the
real `rccl::Recorder`, which `fakes/recorder_fakes.cc` supplies elsewhere. See
`test_categories_micro_recorder.yaml`.
- **`rccl-UnitTestsMicroCollTrace`** — `misc/latency_profiler/CollTrace{,Event,Func,Utils}.cc`
(via `COLL_TRACE{,_EVENT,_FUNC,_UTILS}_CC_PATH`, all from `coll-trace-test.cc`);
suites `CollTrace*`. Its own binary because its `ncclDebugLog`, HIP event and
bootstrap seams would collide with the shared fakes. See
`test_categories_micro_coll_trace.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 @@ -468,6 +489,7 @@ symbol.
| `src/bootstrap.cc` | `fakes/bootstrap_stubs.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/debug.cc` (`ncclDebugLog` recorder, for binaries that link no shared nccl fakes) | `fakes/debug_fakes.cc` |
| `src/dev_runtime.cc` (targets that do not compile the real file) | `fakes/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` |
Expand Down Expand Up @@ -857,6 +879,8 @@ 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-UnitTestsMicroCollTrace`, `rccl-UnitTestsMicroRecorder`,
`rccl-UnitTestsMicroApiTrace`, `rccl-UnitTestsMicroDebug`,
`rccl-UnitTestsMicroSymKernels`, `rccl-UnitTestsMicroTaskPrep` and
`rccl-UnitTestsMicroRmaProxy` — **without configuring/building all of
librccl**. It compiles just the tests + fakes + the hipified unit-under-test
Expand Down Expand Up @@ -899,6 +923,10 @@ cmake --build build -j"$(nproc)"
./build/rccl-UnitTestsMicroConnect # src/graph/connect.cc Preset/Postset 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-UnitTestsMicroCollTrace # misc/latency_profiler tests
./build/rccl-UnitTestsMicroRecorder # misc/recorder.cc tests
./build/rccl-UnitTestsMicroApiTrace # misc/api_trace.cc tests
./build/rccl-UnitTestsMicroDebug # debug.cc tests
./build/rccl-UnitTestsMicroDiagnostics # src/diagnostics/p2p.cc tests
./build/rccl-UnitTestsMicroCe # src/ce_coll.cc tests
./build/rccl-UnitTestsMicroRmaProxy # src/rma/rma_proxy.cc tests
Expand Down
Loading
Loading