-
Notifications
You must be signed in to change notification settings - Fork 13
feat(cluster): add cross-platform RDMA recommender and SLURM GCM workflow #114
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
Open
coketaste
wants to merge
2
commits into
develop
Choose a base branch
from
coketaste/v2-rdma-gcm
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| .PHONY: smoke-slurm smoke-k8s smoke-slurm-verify smoke-k8s-verify | ||
|
|
||
| SLURM_SMOKE_CONFIG ?= examples/slurm-configs/configs/smoke-rdma-gcm-slurm.json | ||
| K8S_SMOKE_CONFIG ?= examples/k8s-configs/configs/smoke-rdma-k8s.json | ||
|
|
||
| SLURM_SMOKE_MANIFEST ?= build_manifest.slurm.smoke.json | ||
| K8S_SMOKE_MANIFEST ?= build_manifest.k8s.smoke.json | ||
|
|
||
| _require-model-vars: | ||
| @test -n "$(MODEL_DIR)" || (echo "ERROR: MODEL_DIR is required"; exit 1) | ||
| @test -n "$(MODEL_TAG)" || (echo "ERROR: MODEL_TAG is required"; exit 1) | ||
|
|
||
| smoke-slurm: _require-model-vars | ||
| MODEL_DIR="$(MODEL_DIR)" madengine build \ | ||
| --tags "$(MODEL_TAG)" \ | ||
| --additional-context-file "$(SLURM_SMOKE_CONFIG)" \ | ||
| --manifest-output "$(SLURM_SMOKE_MANIFEST)" | ||
| MODEL_DIR="$(MODEL_DIR)" madengine run \ | ||
| --manifest-file "$(SLURM_SMOKE_MANIFEST)" \ | ||
| --timeout 3600 | ||
|
|
||
| smoke-k8s: _require-model-vars | ||
| MODEL_DIR="$(MODEL_DIR)" madengine build \ | ||
| --tags "$(MODEL_TAG)" \ | ||
| --additional-context-file "$(K8S_SMOKE_CONFIG)" \ | ||
| --manifest-output "$(K8S_SMOKE_MANIFEST)" | ||
| MODEL_DIR="$(MODEL_DIR)" madengine run \ | ||
| --manifest-file "$(K8S_SMOKE_MANIFEST)" \ | ||
| --timeout 3600 | ||
|
|
||
| smoke-slurm-verify: | ||
| python3 - <<'PY' | ||
| import glob, json | ||
| health = glob.glob("slurm_results/cluster_artifacts/**/gcm_health_summary.json", recursive=True) | ||
| collector = glob.glob("slurm_results/cluster_artifacts/**/gcm_collector_output.log", recursive=True) | ||
| rdma = glob.glob("slurm_results/**/rdma_recommendation.json", recursive=True) | ||
| print("gcm health:", health) | ||
| print("gcm collector:", collector) | ||
| print("rdma artifacts:", rdma) | ||
| for p in rdma[:3]: | ||
| data = json.load(open(p)) | ||
| print(p, data.get("status")) | ||
| PY | ||
|
|
||
| smoke-k8s-verify: | ||
| python3 - <<'PY' | ||
| import glob, json | ||
| rdma = glob.glob("k8s_results/**/rdma_recommendation.json", recursive=True) | ||
| print("rdma artifacts:", rdma) | ||
| for p in rdma[:3]: | ||
| data = json.load(open(p)) | ||
| print(p, data.get("status")) | ||
| PY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| # Cluster Smoke Checklist (RDMA + GCM Phase 1) | ||
|
|
||
| This checklist validates: | ||
|
|
||
| - RDMA recommender on **SLURM + Kubernetes** | ||
| - GCM health checks + one-shot collector on **SLURM only** | ||
|
|
||
| If you prefer one-liners, use: | ||
|
|
||
| ```bash | ||
| make -f examples/Makefile.smoke smoke-slurm MODEL_DIR=<path> MODEL_TAG=<tag> | ||
| make -f examples/Makefile.smoke smoke-k8s MODEL_DIR=<path> MODEL_TAG=<tag> | ||
| ``` | ||
|
|
||
| Or use the wrapper script: | ||
|
|
||
| ```bash | ||
| examples/run-smoke.sh slurm MODEL_DIR=<path> MODEL_TAG=<tag> | ||
| examples/run-smoke.sh verify-slurm | ||
| examples/run-smoke.sh k8s MODEL_DIR=<path> MODEL_TAG=<tag> | ||
| examples/run-smoke.sh verify-k8s | ||
| ``` | ||
|
|
||
| ## 0) Set shared variables | ||
|
|
||
| ```bash | ||
| cd /home/ysha/amd/madengine | ||
| export MODEL_DIR="<path-to-your-model-dir>" | ||
| export MODEL_TAG="<your-model-tag>" | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 1) SLURM smoke (RDMA + GCM) | ||
|
|
||
| ### 1.1 Build | ||
|
|
||
| ```bash | ||
| madengine build \ | ||
| --tags "${MODEL_TAG}" \ | ||
| --additional-context-file "examples/slurm-configs/configs/smoke-rdma-gcm-slurm.json" \ | ||
| --manifest-output "build_manifest.slurm.smoke.json" | ||
| ``` | ||
|
|
||
| ### 1.2 Run | ||
|
|
||
| ```bash | ||
| madengine run \ | ||
| --manifest-file "build_manifest.slurm.smoke.json" \ | ||
| --timeout 3600 | ||
| ``` | ||
|
|
||
| ### 1.3 Verify artifacts | ||
|
|
||
| ```bash | ||
| # GCM health summary | ||
| python3 - <<'PY' | ||
| import glob, json, os | ||
| matches = glob.glob("slurm_results/cluster_artifacts/**/gcm_health_summary.json", recursive=True) | ||
| print("gcm_health_summary files:", matches) | ||
| for p in matches[:2]: | ||
| print(p, json.load(open(p)).get("status")) | ||
| PY | ||
|
|
||
| # GCM collector output | ||
| python3 - <<'PY' | ||
| import glob | ||
| matches = glob.glob("slurm_results/cluster_artifacts/**/gcm_collector_output.log", recursive=True) | ||
| print("gcm_collector_output files:", matches) | ||
| PY | ||
|
|
||
| # RDMA artifacts copied per node collection directory | ||
| python3 - <<'PY' | ||
| import glob, json | ||
| matches = glob.glob("slurm_results/**/rdma_recommendation.json", recursive=True) | ||
| print("rdma_recommendation files:", matches) | ||
| for p in matches[:3]: | ||
| data = json.load(open(p)) | ||
| print(p, data.get("status"), sorted((data.get("recommended_env") or {}).keys())[:6]) | ||
| PY | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 2) Kubernetes smoke (RDMA only) | ||
|
|
||
| ### 2.1 Build | ||
|
|
||
| ```bash | ||
| madengine build \ | ||
| --tags "${MODEL_TAG}" \ | ||
| --additional-context-file "examples/k8s-configs/configs/smoke-rdma-k8s.json" \ | ||
| --manifest-output "build_manifest.k8s.smoke.json" | ||
| ``` | ||
|
|
||
| ### 2.2 Run | ||
|
|
||
| ```bash | ||
| madengine run \ | ||
| --manifest-file "build_manifest.k8s.smoke.json" \ | ||
| --timeout 3600 | ||
| ``` | ||
|
|
||
| ### 2.3 Verify artifacts | ||
|
|
||
| ```bash | ||
| python3 - <<'PY' | ||
| import glob, json | ||
| matches = glob.glob("k8s_results/**/rdma_recommendation.json", recursive=True) | ||
| print("rdma_recommendation files:", matches) | ||
| for p in matches[:3]: | ||
| data = json.load(open(p)) | ||
| print(p, data.get("status"), sorted((data.get("recommended_env") or {}).keys())[:6]) | ||
| PY | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 3) Optional strict-mode gate checks | ||
|
|
||
| ### 3.1 SLURM GCM strict gate | ||
|
|
||
| Set in `examples/slurm-configs/configs/smoke-rdma-gcm-slurm.json`: | ||
|
|
||
| - `cluster.gcm.strict: true` | ||
|
|
||
| Then rerun section 1. If health checks fail, submission should fail early. | ||
|
|
||
| ### 3.2 RDMA strict gate | ||
|
|
||
| Set in smoke config(s): | ||
|
|
||
| - `cluster.rdma.strict: true` | ||
|
|
||
| Then rerun section 1 or 2. Workload should fail when RDMA recommendation cannot be produced. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 checklist hard-codes a developer-specific path (
/home/ysha/amd/madengine). Use a generic instruction (e.g.,cd <repo-root>) so the doc is usable by others and in CI environments.