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
5 changes: 0 additions & 5 deletions cvs/input/config_file/health/mi300_health_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"path": "/opt/amd/agfhc",
"package_tar_ball": "/home/{user-id}/PACKAGES/agfhc-mi300x_1.22.0_ub2204.tar.bz2",
"install_dir": "/home/{user-id}/INSTALL/agfhc/",
"_comments_log_dir": "log_dir has to be a NON NFS local file system",
"log_dir": "/root/agfhc_logs",
"hbm_test_duration": "00:01:30"
},
Expand All @@ -12,7 +11,6 @@
"git_install_path": "/home/{user-id}/INSTALL/",
"git_url": "https://github.com/ROCm/TransferBench.git",
"git_tag": "v1.67.00",
"_comment_rocm_path": "ROCm installation path. Set the placeholder changeme to auto-detect from /opt/rocm or /opt/rocm/core-*",
"rocm_path": "<changeme>",
"results": {
"bytes_to_transfer": "268435456",
Expand All @@ -34,13 +32,10 @@
"git_install_path": "/home/{user-id}/INSTALL/rvs",
"git_url": "https://github.com/ROCm/ROCmValidationSuite.git -b release/rocm-rel-7.2",
"nfs_install": "True",
"_comment_rocm_path": "ROCm installation path.Set to placeholder changeme auto-detect from /opt/rocm or /opt/rocm/core-*",
"rocm_path": "<changeme>",
"_comment_rocm_runtime_lib_path": "Optional. Colon-separated dirs prepended to LD_LIBRARY_PATH for every rvs invocation (also used during the install ldd check). Use this when the rvs binary under /opt/rocm/extras-7 was built against a newer ROCm than /opt/rocm symlinks to and you need it to load amd_smi/rocm_smi from a side-by-side install (e.g. /home/{user-id}/install/lib:/home/{user-id}/install/lib/rocm_sysdeps:/home/{user-id}/install/lib/llvm/lib). Leave empty for default loader behavior.",
"rocm_runtime_lib_path": "",
"config_path_mi300x": "/opt/rocm/share/rocm-validation-suite/conf/MI300X",
"config_path_default": "/opt/rocm/share/rocm-validation-suite/conf",
"_comment_rvs_test_level": "RVS test level configuration (0-5). 0: Run individual tests (skip level test), 1-5: Run LEVEL config test if RVS >= 1.3.0, else run individual tests. Default is 4.",
"rvs_test_level": 4,
"tests": [
{
Expand Down
226 changes: 18 additions & 208 deletions cvs/input/config_file/preflight/README_preflight_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,19 @@ preflight/

## Configuration Parameters

### Complete Parameter Reference
Every parameter -- with its type, real default, constraints and an example --
is documented by `cvs man`:

All parameters below are optional and have sensible defaults. The sample configuration file includes all available parameters with their default values and inline comments explaining their purpose.
```bash
cvs man preflight_checks # every parameter
cvs man preflight_checks gid_index # a single parameter
cvs man preflight_checks --json # machine-readable
```

That reference is generated from `PreflightConfigFile` in
`cvs/parsers/schemas.py`, so it cannot drift from the code the way a
hand-written table does. All parameters are optional and have sensible
defaults.

### Important Update: RDMA Connectivity Testing

Expand All @@ -115,93 +125,7 @@ All parameters below are optional and have sensible defaults. The sample configu

**Updated parameter names**: Configuration parameters now use accurate names (`ibv_test_timeout`, `ibv_test_port_range`) that reflect the use of `ibv_rc_pingpong` for testing.

### RDMA Batching (`connectivity_check.rdma`)

- **`nodes_per_full_mesh_group`** (default: 128)
- Group size for parallel RDMA connectivity testing (2-512 nodes per group)
- Smaller groups use fewer resources per node but require more rounds
- Adjust based on cluster size and resource constraints

### Debug Settings (`debug`)

- **`scriptlet`** (default: false)
- Enable ScriptLet debug mode: preserve generated scripts/logs on remote nodes
- For RDMA connectivity, wraps each ibv_rc_pingpong server in strace
- Creates per-test traces under /tmp/preflight/strace_server_<iface>_<port>.log
- **Warning**: Can be expensive at scale due to strace overhead

### Node Check Settings (`node_check`)

- **`enabled`** (default: `true`)
- Enables GPU visibility, AMDGPU/KFD, kernel-health, and ROCm validation
- Set to `false` to skip node-local health checks

- **`gpus_per_node`** (default: `4`)
- Exact number of AMD GPUs expected on every node
- GPU visibility is generation-independent and can run on older or newer AMD hardware

- **`expected_rocm_version`** (default: "6.2.0")
- Expected ROCm version across all cluster nodes
- Must match the output of `amd-smi version` on all nodes
- Format: "major.minor.patch" (e.g., "6.2.0", "5.7.1")

### Connectivity Check Settings (`connectivity_check`)

#### RDMA Settings (`connectivity_check.rdma`)

- **`connectivity_mode`** (default: "basic")
- **"basic"**: Test adjacent node pairs (fast, ~14% coverage for 8 nodes)
- **"full_mesh"**: Test all possible node pairs (comprehensive, 100% coverage)
- **"skip"**: Skip RDMA interface presence, GID validation, and pairwise connectivity

- **`gid_index`** (default: "3")
- GID index to check on all configured RDMA interfaces
- Typically "3" for RoCE (RDMA over Converged Ethernet)
- Must be a valid GID index for your InfiniBand/RoCE setup

- **`interfaces`** (default: `["rocep28s0", "rocep62s0", "rocep79s0", "rocep96s0"]`)
- List of RDMA device names that should be present on all cluster nodes
- Examples:
- `["rocep28s0", "rocep62s0", "rocep79s0", "rocep96s0"]` - Standard 4-interface setup
- `["mlx5_0", "mlx5_1"]` - Mellanox 2-interface setup

- **`ibv_test_timeout`** (default: 90)
- Timeout in seconds for each ibv_rc_pingpong connectivity test
- Integer value (seconds), used directly as configured
- Uses `ibv_rc_pingpong` (direct InfiniBand verbs) for RCCL-compatible testing
- Increase for slower networks or high-latency connections

- **`ibv_test_port_range`** (default: "10000-50000")
- Port range for ibv_rc_pingpong tests to avoid conflicts
- Format: "start-end" (e.g., "10000-50000", "10000-10999")
- Ensure ports are not blocked by firewalls

- **`inter_full_mesh_group_pairs_per_wave`** (default: "auto")
- Max ordered group-pairs (Gi→Gj keys) per wave during inter-group RDMA testing
- "auto" calculates as max(1, num_groups - 1)
- Can be set to a specific integer to control wave size and reduce memory/CPU load

- **`prune_failure_threshold`** (default: 0.5)
- Prune nodes whose fraction of peers with ≥1 FAIL intra test is ≥ this value
- Range: 0.0 to 1.0 (0.5 = 50% failure threshold)
- Helps remove problematic nodes before inter-group testing
- Lower values (0.2-0.3) are more aggressive at removing problematic nodes

- **`port_retry_max`** (default: 3)
- Max retry attempts for pairs whose logs show PORT_LISTEN_FAILED
- Range: 0-10 retries with new TCP ports after each wave
- Helps handle port conflicts during large-scale testing

- **`port_retry_gap`** (default: 1000)
- Port gap when remapping ports for PORT_LISTEN_FAILED retries
- Range: 1-65535
- Starts at (max port in batch) + this gap to reduce overlap with ephemeral ports

- **`exclude_failed_interface_nodes`** (default: "true")
- Legacy hint for reporting: preflight now prunes interface/GID-failed nodes automatically
- Interface failures are excluded from mesh testing regardless of this flag

##### Legacy RDMA paths — deprecated
### Legacy RDMA paths — deprecated

Existing RDMA users may temporarily retain `node_check.gid_index` and
`node_check.rdma_interfaces`. CVS normalizes them to
Expand All @@ -210,15 +134,12 @@ and emits a deprecation warning. If a legacy and canonical value are both
present, they must match. New configurations should use the canonical RDMA
paths; the compatibility paths will be removed in a future release.

#### IFoE Settings (`connectivity_check.ifoe`) — MI4XX scale-up fabric

IFoE validation is organized into fabric admission, strict L2 connectivity,
and TransferBench data-path validation. CVS owns `afmctl` discovery, privilege
handling, BDF and port discovery, strict coverage, traffic selection, timeout
derivation, and result parsing.
### IFoE settings that are no longer configurable

The earlier configuration shape exposed those implementation details directly.
They now follow this fixed policy:
IFoE validation (`connectivity_check.ifoe`) used to expose implementation
details -- fabric discovery, privilege handling, port selection, timeouts --
directly as config keys. Those keys are no longer read; CVS now derives all
of this automatically and follows a fixed policy:

| Previous setting | Current CVS behavior |
|---|---|
Expand All @@ -232,117 +153,6 @@ They now follow this fixed policy:
| `loss_threshold_pct` | Fail on any reported loss or incomplete coverage |
| `per_ping_timeout` / `ssh_timeout` | Derive conservative timeouts from the requested workload |

- **`fabric_checks`** (default: `false`)
- Enables MI4XX-only AIFM/AFM/vPOD, station-mask, and IFoE port admission checks
- Set to `true` only on MI4XX systems; it remains disabled for MI3XX systems
- Requires `node_check.enabled: true`

##### L2 ping (`connectivity_check.ifoe.l2ping`)

Runs `afmctl test ping` with strict full-mesh coverage on every admitted IFoE
port and validates per-port and aggregate summary accounting.

- **`enabled`** (default: `false`)
- Enables the mandatory L2 connectivity gate before TransferBench and RDMA
- **`pings_per_port`** (default: `3`)
- Number of ping samples sent per selected IFoE port pair

##### TransferBench (`connectivity_check.ifoe.transferbench`)

- **`enabled`** (default: `false`)
- Enables the TransferBench IFoE data-path gate before RDMA
- **`scope`** (default: `"node"`)
- `"node"` runs an independent smoketest on each node
- `"cluster"` runs one multi-rank test across the admitted cluster
- **`profile`** (default: `"smoketest"`)
- Selects the CVS-supported test profile; `"smoketest"` is currently supported
- **`message_sizes`** (default: `["1K", "16M"]`)
- Message sizes exercised by the selected profile
- **`iterations`** (default: `2`)
- Validated iterations per test and message size
- **`warmup_iterations`** (default: `0`)
- Warmup iterations performed before validation

#### Node Smoke Settings (`node_smoke`) — opt-in (Primus Tier 1)

Runs Primus `node_smoke` on each reachable node via `primus-cli direct --single -- node_smoke`
over parallel SSH (no Slurm required). Reference: Primus `docs/node-smoke-test-instruction.md`
on branch `dev/preflight-direct-test`.

- **`connectivity_mode`** (default: `"skip"`)
- `"run"` — execute node_smoke on every reachable node
- `"skip"` — preflight records a SKIPPED result and does not invoke Primus
- **`auto_setup`** (default: `true`)
- Clone/update Primus and create the venv with minimal deps (ROCm PyTorch) before node_smoke
- **`setup_timeout`** (default: `600`)
- SSH timeout (seconds) for the per-node Primus auto_setup step
- **`force_reclone`** (default: `false`)
- Remove `primus_dir` and clone fresh on every run (destructive)
- **`shared_install`** (default: `true`)
- Leader node clones/installs on shared NFS home; other nodes wait (recommended for shared home)
- **`pip_install_mode`** (default: `"minimal"`)
- `"minimal"` — ROCm PyTorch only; `"requirements"` — `pip install -r requirements.txt`; `"skip"` — venv only
- **`torch_pip_index_url`** (default: `"https://download.pytorch.org/whl/rocm6.2"`)
- PyTorch wheel index for minimal install; match your ROCm version
- **`primus_git_url`** (default: `"https://github.com/AMD-AIG-AIMA/Primus.git"`)
- **`primus_git_branch`** (default: `"dev/preflight-direct-test"`)
- **`primus_git_recurse_submodules`** (default: `false`)
- **`primus_dir`** (default: `"/home/{user-id}/INSTALL/Primus"`)
- Required when `connectivity_mode` is `"run"`; `{user-id}` is resolved at runtime
- **`venv_activate`** (default: `"/home/{user-id}/envs/preflight/.venv/bin/activate"`)
- Required when `connectivity_mode` is `"run"`
- **`gpus_per_node`** (default: `8`)
- **`master_port`** (default: `1234`)
- **`dump_path`** (default: `""`)
- Per-node smoke JSON output; empty uses `<reporting.artifacts_root_dir>/node_smoke`
- **`expected_rdma_nics`** (default: `null`)
- Defaults to `len(node_check.rdma_interfaces)` when null
- **`ulimit_l_min_gb`** (default: `32`) — FAIL below this memlock limit; `0` disables
- **`shm_min_gb`** (default: `8`) — FAIL below this `/dev/shm` size; `0` disables
- **`skip_dmesg`** (default: `false`)
- **`allow_foreign_procs`** (default: `false`)
- **`allowed_procs`** (default: `"gpuagent,rocm-smi-daemon,amd-smi,dcgm-exporter"`)
- **`require_tools`** (default: `""`) — empty = warn only
- **`nccl_socket_ifname`** / **`gloo_socket_ifname`** (default: `""`)
- **`nccl_ib_hca`** (default: `""`) — defaults to comma-joined `node_check.rdma_interfaces`
- **`nccl_ib_gid_index`** (default: `null`) — defaults to `node_check.gid_index`
- **`ssh_timeout`** (default: `300`)
- **`extra_args`** (default: `[]`) — additional flags forwarded to primus-cli

#### Tier 2 perf sanity (`node_smoke.tier2_perf`) — optional

When `tier2_perf` is `true`, preflight forwards `--tier2-perf` to Primus `node_smoke`, enabling all three Tier 2 checks on each node (same as `launch_nodesmoke_ssh.sh -- --tier2-perf`):

1. **Large GEMM TFLOPS floor** — 8192³ bf16 `torch.matmul`; FAIL below `gemm_tflops_min` (default 600)
2. **HBM D2D bandwidth** — 512 MB device-to-device copy; FAIL below `hbm_gbs_min` (default 2000 GB/s)
3. **Local multi-GPU RCCL all-reduce** — node-local only; FAIL below `rccl_gbs_min` (default 100 GB/s)

Set `NCCL_IB_HCA`, `NCCL_SOCKET_IFNAME`, and `NCCL_IB_GID_INDEX` (via `node_smoke` config or cluster `env_vars`) before enabling Tier 2 — RCCL init enumerates every transport even though the all-reduce is local-only.

- **`tier2_perf`** (default: `false`) — master switch; maps to `--tier2-perf`
- **`gemm_tflops_min`** (default: `600`) — `--gemm-tflops-min`
- **`hbm_gbs_min`** (default: `2000`) — `--hbm-gbs-min`
- **`rccl_gbs_min`** (default: `100`) — `--rccl-gbs-min`
- **`rccl_size_mb`** (default: `64`) — `--rccl-size-mb`
- **`rccl_timeout_sec`** (default: `120`) — `--rccl-timeout-sec`

Tier 2 runs need a longer SSH budget; when `tier2_perf` is enabled the effective timeout is at least 600 seconds even if `ssh_timeout` is lower.

### Reporting Settings (`reporting`)

- **`generate_html_report`** (default: `true`)
- Whether to generate detailed HTML report
- Set to `false` to disable HTML report generation

- **`artifacts_root_dir`** (default: `"/tmp/{user-id}/preflight"`)
- Root directory where preflight artifacts are saved
- Includes HTML reports and RDMA full_mesh workspace logs under `rdma_connectivity_workspace/`
- Must be writable by the user running the tests

- **`generate_rdma_pairs_csv`** (default: `true`)
- Whether to generate CSV file with failed RDMA pairs alongside HTML report
- Set to `false` to disable CSV generation

## Usage Examples

### Basic 8-Node Cluster Check
Expand Down
Loading