Repository navigation
test(rccl): add host microtests for src/ras/diagnostics_env.cc - #12435
Conversation
|
@argus review |
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: no test goes above 2 ranks, so the covered[] rank grouping is unpinned, and no test installs a failing emit, so every reporter-error path stays untaken.
Comment @argus review to re-run, or @argus re-review after pushing.
09e80bb to
dc2bdaa
Compare
|
@argus re-review |
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: no Summarize test feeds two distinct env keys, leaving the key dedup and comparator in diagnostics_env.cc unpinned; the allocation-failure seam from the last round is also still open.
Comment @argus review to re-run, or @argus re-review after pushing.
dc2bdaa to
aead397
Compare
|
@argus re-review |
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: the new two-key test uses NCCL_Z/NCCL_A, which share no prefix, so the key-prefix handling at diagnostics_env.cc:51 and :82 is still unpinned.
Comment @argus review to re-run, or @argus re-review after pushing.
aead397 to
069e797
Compare
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: no test feeds a multi-rank comm whose env is consistent, so deleting the value compare at diagnostics_env.cc:277 leaves all 24 tests green.
Comment @argus review to re-run, or @argus re-review after pushing.
069e797 to
991a70a
Compare
|
@argus re-review |
|
@argus review |
|
@aduforest the current head ( |
|
@argus review |
|
@argus re-review |
|
Cancelling the remaining gfx950 jobs on this run so the TheRock submodule bump PRs can be prioritized on the gfx950 queue. This change does not target gfx950, and gfx950 was the only work still outstanding. Jobs that already finished are unchanged. Re-run failed jobs if you need gfx950 results before merge. |
TheRock Submodule Bump ActivityNewest first
|
JIRA ID: AICOMRCCL-2460 ## What Adds host-only microtests for `src/ras/diagnostics_env.cc`, covering environment collection, rank summaries, and error handling without changing production code. The 32 enabled tests cover: - local NCCL environment collection and non-NCCL filtering; - empty, exact-capacity, and truncated payloads; - reporter and payload validation failures; - consistent, incomplete, mismatched, unset, and truncated rank summaries; - multiple communicators, malformed payloads, display truncation, and control-character sanitization; - stable rank grouping with repeated values and reporter-error propagation across every summary path; - multi-key ordering/deduplication and allocation failures in collection and summarization. One additional disabled regression tracks the production reporting defect AICOMRCCL-2743. ## How `ras-diagnostics-env-test.cc` includes the hipified `ras/diagnostics_env.cc` directly in the existing `rccl-UnitTestsMicro` binary. It reuses the real shared diagnostics helpers and the communicator registry already supplied by the existing RAS microtests. ## Coverage Previously reported local coverage for this source file is listed below. Coverage was not regenerated for this review follow-up; the CI results below are historical. - Functions: 20/20 (100.00%) - Lines: 298/298 (100.00%) - Regions: 557/763 (73.00%) - Branches: 286/428 (66.82%) ## Mutation Testing The following results are preserved from the previously reported local mutation runs. Current-head mutation results have not been verified. Previously reported targeted behavioral mutations: 13/13 killed. The NCCL-prefix filter, exact-capacity boundary, value equality, covered-rank grouping, reporter-error propagation, key-length ordering and matching, key deduplication, truncated nonempty payload handling, full communicator identity, candidate-key sizing, and allocation-failure mutations were all caught by the suite. ## Historical CI [Host unit tests (CPU-only) CI](https://github.com/ROCm/rocm-systems/actions/runs/36798053397/job/110165926508) passed for commit `6a5dedc6b8be` after merging develop and retaining both the RAS and tuning test registrations. | Check | Result | | --- | --- | | `RasDiagnosticsEnvMicrotest.*` | 25/25 passed in the shared binary | | Full `rccl-UnitTestsMicro` | 1468/1468 passed | | Host unit tests (CPU-only) job | Passed | | Production source changes | None; changes are confined to `projects/rccl/test/` | ## Review follow-up - Centralized `environ` save/override/restore in `fakes/env_fakes.{h,cc}`. During an enumeration override, `SetMicroEnviron`, `SetMicroEnv`, `micro_getenv`, and `getenv` agree; tests cover updates, absence, duplicates, malformed entries, and restoration. - Environment, common diagnostics, and RAS suites share mutex-protected communicator registry installation/reset, including sorted-state reset. Common diagnostic owned-communicator/reporter helpers are shared too. - Wrapped collector output in RAII, collapsed the allocation forwarders, removed internal allocation-layout assertions, and derive the failure-injection sweep from a successful baseline run. - Split reporter-error paths and negative-size validation into individually named tests; derive the displayed byte budget from `RAS_DIAG_ENV_BYTES`. ## Deferred production finding **AICOMRCCL-2743**, under **AICOMRCCL-2397**, tracks the environment reporters' omission of host/process hashes. Different communicator identities sharing `commHash` currently look identical in reports. Production grouping is not alleged broken. `DISABLED_Summarize_HashCollisionsReportFullCommIdentity` specifies full IDs for consistent, mismatch, and mismatch-summary output. Explicitly enabling it reproduces all three expectation failures on current production. It remains disabled pending a separate production fix. The enabled multi-communicator test still checks grouping without requiring the shortened identity format. ## Current local validation - **32/32 enabled environment tests**, plus **23 common diagnostics tests and 71 RAS tests**, passed **20 shuffled repetitions** (126 tests per iteration). One production regression is disabled as described above. - Environment/common diagnostics and the environment fake use **ASan + UBSan**. The RAS translation unit uses **ASan only**, because an existing unrelated malformed-notification fixture loads enum value 99 and trips enum UBSan in `ras.cc`. Leak detection is disabled. - Changed translation units were rebuilt and linked against cached shared fake objects and GoogleTest. This is focused validation, not a fresh full host-binary build. Current-head full CI is pending; coverage and the historical 13-mutation set have not been rerun.
JIRA ID: AICOMRCCL-2460
What
Adds host-only microtests for
src/ras/diagnostics_env.cc, covering environment collection, rank summaries, and error handling without changing production code.The 32 enabled tests cover:
One additional disabled regression tracks the production reporting defect AICOMRCCL-2743.
How
ras-diagnostics-env-test.ccincludes the hipifiedras/diagnostics_env.ccdirectly in the existingrccl-UnitTestsMicrobinary. It reuses the real shared diagnostics helpers and the communicator registry already supplied by the existing RAS microtests.Coverage
Previously reported local coverage for this source file is listed below. Coverage was not regenerated for this review follow-up; the CI results below are historical.
Mutation Testing
The following results are preserved from the previously reported local mutation runs. Current-head mutation results have not been verified.
Previously reported targeted behavioral mutations: 13/13 killed.
The NCCL-prefix filter, exact-capacity boundary, value equality, covered-rank grouping, reporter-error propagation, key-length ordering and matching, key deduplication, truncated nonempty payload handling, full communicator identity, candidate-key sizing, and allocation-failure mutations were all caught by the suite.
Historical CI
Host unit tests (CPU-only) CI passed for commit
6a5dedc6b8beafter merging develop and retaining both the RAS and tuning test registrations.RasDiagnosticsEnvMicrotest.*rccl-UnitTestsMicroprojects/rccl/test/Review follow-up
environsave/override/restore infakes/env_fakes.{h,cc}. During an enumeration override,SetMicroEnviron,SetMicroEnv,micro_getenv, andgetenvagree; tests cover updates, absence, duplicates, malformed entries, and restoration.RAS_DIAG_ENV_BYTES.Deferred production finding
AICOMRCCL-2743, under AICOMRCCL-2397, tracks the environment reporters' omission of host/process hashes. Different communicator identities sharing
commHashcurrently look identical in reports. Production grouping is not alleged broken.DISABLED_Summarize_HashCollisionsReportFullCommIdentityspecifies full IDs for consistent, mismatch, and mismatch-summary output. Explicitly enabling it reproduces all three expectation failures on current production. It remains disabled pending a separate production fix. The enabled multi-communicator test still checks grouping without requiring the shortened identity format.Current local validation
ras.cc. Leak detection is disabled.