-
Notifications
You must be signed in to change notification settings - Fork 47
[Primus Preflight] Add cluster rdma env recommender tool & cluster NIC rdma perf tool from clusterSphere (distinf tools) #700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| ## Cluster Sphere — RDMA environment recommendations | ||
|
|
||
| ### Host `useocpm2m-097-078` | ||
|
|
||
| **Warnings:** | ||
|
|
||
| - Multiple firmware versions detected — standardization recommended. | ||
|
|
||
| | RDMA | PCI | NETDEV | Firmware | GID idx | GID | Vendor | | ||
| |------|-----|--------|----------|---------|-----|--------| | ||
| | mlx5_0 | 0000:0c:00.0 | rdma0 | 28.47.1900 | 3 | ::ffff:10.224.0.73 | MLNX | | ||
| | mlx5_1 | 0000:1f:00.0 | eth0 | 22.47.1088 | 3 | ::ffff:10.158.212.73 | MLNX | | ||
| | mlx5_2 | 0000:2a:00.0 | rdma1 | 28.47.1900 | 3 | ::ffff:10.224.4.73 | MLNX | | ||
| | mlx5_3 | 0000:41:00.0 | rdma2 | 28.47.1900 | 3 | ::ffff:10.224.8.73 | MLNX | | ||
| | mlx5_4 | 0000:58:00.0 | rdma3 | 28.47.1900 | 3 | ::ffff:10.224.12.73 | MLNX | | ||
| | mlx5_5 | 0000:86:00.0 | rdma4 | 28.47.1900 | 3 | ::ffff:10.224.16.73 | MLNX | | ||
| | mlx5_6 | 0000:9a:00.0 | eth1 | 22.47.1088 | - | N/A | MLNX | | ||
| | mlx5_7 | 0000:a5:00.0 | rdma5 | 28.47.1900 | 3 | ::ffff:10.224.20.73 | MLNX | | ||
| | mlx5_8 | 0000:bd:00.0 | rdma6 | 28.47.1900 | 3 | ::ffff:10.224.24.73 | MLNX | | ||
| | mlx5_9 | 0000:d5:00.0 | rdma7 | 28.47.1900 | 3 | ::ffff:10.224.28.73 | MLNX | | ||
|
|
||
| **Suggested NCCL / socket exports:** | ||
|
|
||
| ```bash | ||
| export NCCL_IGNORE_CPU_AFFINITY=1 | ||
| export NCCL_IB_GID_INDEX=3 | ||
| export NCCL_IB_HCA=mlx5_0,mlx5_2,mlx5_3,mlx5_4,mlx5_5,mlx5_7,mlx5_8,mlx5_9 | ||
| export NCCL_SOCKET_IFNAME=eth0 | ||
| export GLOO_SOCKET_IFNAME=eth0 | ||
| ``` | ||
|
|
||
| **Suggested rocSHMEM exports:** | ||
|
|
||
| ```bash | ||
| export ROCSHMEM_HEAP_SIZE=7524589824 | ||
| export ROCSHMEM_MAX_NUM_CONTEXTS=256 | ||
| ``` | ||
|
|
||
| **Example Docker launch (vendor-specific template):** | ||
|
|
||
| ```bash | ||
| docker run --rm -it \ | ||
| --device /dev/dri \ | ||
| --device /dev/infiniband \ | ||
| --device /dev/kfd \ | ||
| --network host \ | ||
| --ipc host \ | ||
| --privileged \ | ||
| --ulimit memlock=-1:-1 \ | ||
| --group-add video \ | ||
| --cap-add SYS_PTRACE \ | ||
| --security-opt seccomp=unconfined \ | ||
| --shm-size 64G \ | ||
| -v /sys:/sys \ | ||
| -v $HOME/.ssh:/root/.ssh \ | ||
| -v $HOME:$HOME \ | ||
| -v /dev/infiniband:/dev/infiniband \ | ||
| -v /sys/class/infiniband:/sys/class/infiniband:ro \ | ||
| -v /sys/class/net:/sys/class/net:ro \ | ||
| -v /sys/bus/pci:/sys/bus/pci:ro \ | ||
| <image> | ||
| ``` | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,7 +13,97 @@ primus-cli preflight \ | |||||||||||||||||||||
| --report-file-name preflight_report | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Slurm (multi-node example): | ||||||||||||||||||||||
| ### Cluster Sphere (optional) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| RDMA environment hints (NCCL/GLOO/rocSHMEM) from local InfiniBand/RoCE devices, plus optional Verbs `ib_write_bw` on two ranks: | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| # Info report: export hints only | ||||||||||||||||||||||
| primus-cli preflight --cluster-sphere-env --dump-path output/preflight | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Full preflight + Cluster Sphere env + ib_write_bw on the perf report (use WORLD_SIZE=2 for the Verbs test) | ||||||||||||||||||||||
| primus-cli slurm srun -N 2 --ntasks-per-node=1 -- primus-cli preflight --cluster-sphere | ||||||||||||||||||||||
|
Comment on lines
+21
to
+25
|
||||||||||||||||||||||
| # Info report: export hints only | |
| primus-cli preflight --cluster-sphere-env --dump-path output/preflight | |
| # Full preflight + Cluster Sphere env + ib_write_bw on the perf report (use WORLD_SIZE=2 for the Verbs test) | |
| primus-cli slurm srun -N 2 --ntasks-per-node=1 -- primus-cli preflight --cluster-sphere | |
| # Add Cluster Sphere env hints to the preflight info report | |
| primus-cli preflight --cluster-sphere-env --dump-path output/preflight | |
| # Full preflight + Cluster Sphere env + ib_write_bw on the perf report (use WORLD_SIZE=2 for the Verbs test) | |
| primus-cli slurm srun -N 2 --ntasks-per-node=1 -- preflight --cluster-sphere |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| ############################################################################### | ||
| # Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved. | ||
| # | ||
| # See LICENSE for license information. | ||
| ############################################################################### | ||
|
|
||
| """Cluster Sphere RDMA helpers for Primus Preflight (in-tree under this package).""" | ||
|
|
||
| from primus.tools.preflight.cluster_sphere.paths import resolve_cluster_sphere_root | ||
|
|
||
| __all__ = ["resolve_cluster_sphere_root"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file looks like a generated sample report and includes a real hostname and internal IP addresses. Checking this into the repo can unintentionally leak environment details and will likely go stale. Consider removing it from source control or replacing values with clearly anonymized placeholders (e.g.,
host-0,10.x.x.x).