-
Notifications
You must be signed in to change notification settings - Fork 311
feat(glm52-agentx): add compact B300 TensorRT-LLM recipes / 新增 B300 TensorRT-LLM 紧凑配方 #2993
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
RohitNagraj
wants to merge
34
commits into
main
Choose a base branch
from
glm5.2-fp4-b300-dynamo-trt-agentic-mtp-compact-rc26
base: main
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
34 commits
Select commit
Hold shift + click to select a range
f2af796
feat(config): add compact GLM-5.2 B300 AgentX recipes
RohitNagraj 427c61d
chore(changelog): link PR #2993
RohitNagraj 5f2b9e3
fix(changelog): correct PR #2993 link placement
RohitNagraj f4f27f8
fix(config): sync main and correct GLM-5.2 B300 recipe paths
RohitNagraj fe9a40e
fix(recipes): remove stale B300 node exclusions
RohitNagraj e571ea1
fix(recipes): use portable B300 CPU binding
RohitNagraj 7e5ed31
fix(recipes): fall back to available B300 fabric devices
RohitNagraj 10db1e8
chore: merge main and resolve configuration conflicts
RohitNagraj 6bb8744
fix(recipes): extend GLM-5.2 B300 Slurm limit
RohitNagraj 4022048
chore: merge main and resolve perf changelog
RohitNagraj 0f4a194
fix(eval): co-locate GLM-5.2 lm-eval frontend
RohitNagraj e3f393c
Merge origin/main and resolve perf changelog
RohitNagraj a9d7b2a
fix(recipes): retry truncated Dynamo installs
RohitNagraj 813d5ab
fix(recipes): allow c1 profiling to drain
RohitNagraj 160e321
Merge origin/main and resolve perf changelog
RohitNagraj 9ead89c
fix(recipes): use LIBFABRIC for GLM-5.2 KV transfer
RohitNagraj 8d14b89
Merge origin/main and resolve perf changelog
RohitNagraj d714eb6
fix: stage EFA runtime for GLM-5.2 LIBFABRIC
RohitNagraj 00d2b12
Merge origin/main and migrate GLM-5.2 recipes
RohitNagraj 56f4ee9
chore: sync PR #2993 with main
RohitNagraj 8407735
fix(glm52-agentx): inspect PMIx worker startup
RohitNagraj 01c106f
fix(glm52-agentx): preserve MPI worker identity
RohitNagraj 0c6e465
fix(glm52-agentx): allow time for the complete sweep
RohitNagraj ca83053
chore: merge main into GLM-5.2 B300 recipes
RohitNagraj 921c7a6
fix(glm52): repair Dynamo install and KV transfer setup
RohitNagraj 5b8bf97
chore: sync main with GLM-5.2 B300 configuration
RohitNagraj a91f7bb
fix: use standard CUDA KV allocations for GLM-5.2 B300
RohitNagraj 9a903c1
fix(b300): preserve AgentX result identity and producer status
RohitNagraj 33b43b0
chore: reconcile current model configuration additions
RohitNagraj 618a054
chore: synchronize current model configuration entries
RohitNagraj 1f92933
fix(glm52): serialize c20 prefill transfer posting
RohitNagraj e683a55
fix(glm52): harden B300 worker startup
RohitNagraj dbf9b73
feat(agentx): adopt native B300 SRT recipes
RohitNagraj 1df41b9
chore(glm52-agentx): sync with current main
RohitNagraj 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
44 changes: 44 additions & 0 deletions
44
inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/clean_stale_shm.sh
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,44 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Use only with exclusive node allocations. Anchor the cutoff to allocation | ||
| # start so a later frontend/worker setup cannot remove this job's segments. | ||
| clean_stale_shm() { | ||
| python3 -S - "$@" <<'PY' | ||
| import os | ||
| import socket | ||
| import stat | ||
| import sys | ||
| import time | ||
| from pathlib import Path | ||
|
|
||
| directory = Path(sys.argv[1]) | ||
| job_start = int(sys.argv[2]) | ||
| if job_start <= 600 or job_start > time.time(): | ||
| raise ValueError("SLURM_JOB_START_TIME must be a valid allocation start timestamp") | ||
| cutoff = job_start - 600 | ||
| prefixes = ("vader_segment.", "nccl-", "sem.", "psm3", "fe80::") | ||
| entries = list(directory.iterdir()) | ||
| removed = 0 | ||
| for entry in entries: | ||
| if not entry.name.startswith(prefixes): | ||
| continue | ||
| try: | ||
| info = entry.lstat() | ||
| if (info.st_uid != os.getuid() or not stat.S_ISREG(info.st_mode) | ||
| or info.st_mtime >= cutoff): | ||
| continue | ||
| entry.unlink() | ||
| removed += 1 | ||
| except FileNotFoundError: | ||
| # Another rank may have already removed the same stale segment. | ||
| continue | ||
| print(f"[clean_stale_shm] {socket.gethostname()}: removed {removed} stale segments " | ||
| f"from {len(entries)} entries; cutoff={cutoff}") | ||
| PY | ||
| } | ||
|
|
||
| if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then | ||
| source /infmax-workspace/benchmarks/benchmark_lib.sh --validation-only || exit 1 | ||
| check_env_vars SLURM_JOB_START_TIME || exit 1 | ||
| clean_stale_shm /dev/shm "$SLURM_JOB_START_TIME" | ||
| fi |
61 changes: 61 additions & 0 deletions
61
inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/diagnose-pmix.sh
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,61 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| bash "$(dirname "${BASH_SOURCE[0]}")/clean_stale_shm.sh" || exit 1 | ||
|
|
||
| # Read launch metadata without initializing MPI or changing its configuration. | ||
| python3 -S - <<'PY' | ||
| import json | ||
| import os | ||
| import socket | ||
| import stat | ||
| from pathlib import Path | ||
|
|
||
| names = ( | ||
| "SLURM_MPI_TYPE", "SLURM_JOB_ID", "SLURM_STEP_ID", "SLURM_JOB_UID", | ||
| "SLURM_PROCID", "SLURM_LOCALID", "PMIX_NAMESPACE", "PMIX_RANK", | ||
| "PMIX_SERVER_URI", "PMIX_SERVER_URI2", "PMIX_SERVER_URI21", | ||
| "PMIX_SERVER_URI3", "PMIX_SERVER_URI4", "PMIX_SERVER_URI41", | ||
| "PMIX_SERVER_TMPDIR", "PMIX_SYSTEM_TMPDIR", "PMIX_SECURITY_MODE", | ||
| "PMIX_PTL_MODULE", "PMIX_GDS_MODULE", "PMIX_MCA_psec", | ||
| "PMIX_MCA_ptl", "PMIX_MCA_gds", | ||
| ) | ||
| environment = {name: os.environ[name] for name in names if name in os.environ} | ||
| paths = {environment[name] for name in ("PMIX_SERVER_TMPDIR", "PMIX_SYSTEM_TMPDIR") | ||
| if environment.get(name, "").startswith("/")} | ||
| for name, value in environment.items(): | ||
| if name.startswith("PMIX_SERVER_URI"): | ||
| for component in value.split(";"): | ||
| if component.startswith("file:"): | ||
| component = component.removeprefix("file:") | ||
| if component.startswith("/"): | ||
| paths.add(component) | ||
| job = environment.get("SLURM_JOB_ID", "") | ||
| step = environment.get("SLURM_STEP_ID", "") | ||
| uid = environment.get("SLURM_JOB_UID", "") | ||
| if job.isdecimal() and step.isdecimal(): | ||
| paths.update((f"/var/spool/slurmd/pmix.{job}.{step}", | ||
| f"/tmp/spmix_appdir_{job}.{step}")) | ||
| if uid.isdecimal(): | ||
| paths.add(f"/tmp/spmix_appdir_{uid}_{job}.{step}") | ||
| metadata = {} | ||
| for name in sorted(paths): | ||
| try: | ||
| info = Path(name).stat() | ||
| metadata[name] = {"uid": info.st_uid, "gid": info.st_gid, | ||
| "mode": stat.filemode(info.st_mode)} | ||
| except OSError as error: | ||
| metadata[name] = {"errno": error.errno} | ||
| try: | ||
| uid_map = Path("/proc/self/uid_map").read_text().strip() | ||
| except OSError as error: | ||
| uid_map = f"unavailable: errno={error.errno}" | ||
| print("PMIx launch diagnostics: " + json.dumps({ | ||
| "hostname": socket.gethostname(), "uid": os.getuid(), "gid": os.getgid(), | ||
| "uid_map": uid_map, "environment": environment, "paths": metadata, | ||
| }, sort_keys=True)) | ||
| PY | ||
|
|
||
| if command -v ompi_info >/dev/null 2>&1; then | ||
| timeout 10s ompi_info --version || true | ||
| timeout 10s ompi_info --param pmix all || true | ||
| fi | ||
57 changes: 57 additions & 0 deletions
57
inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/prepare-dynamo-venv.sh
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,57 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Source before the SRT installer so its lock and packages share a writable prefix. | ||
| source /infmax-workspace/benchmarks/benchmark_lib.sh --validation-only || return 1 | ||
| check_env_vars SLURM_JOB_ID SLURM_STEP_ID || return 1 | ||
|
|
||
| INFX_DYNAMO_VENV=$(python3 - <<'PY' | ||
| import fcntl | ||
| import os | ||
| import re | ||
| import venv | ||
| from pathlib import Path | ||
|
|
||
| job = os.environ["SLURM_JOB_ID"] | ||
| step = os.environ["SLURM_STEP_ID"] | ||
| if not re.fullmatch(r"[0-9]+", job) or not re.fullmatch(r"[0-9]+", step): | ||
| raise ValueError("Dynamo virtual environment requires numeric Slurm job and step IDs") | ||
| root = Path("/tmp") / f"infx-dynamo-{job}.{step}" | ||
| root.mkdir(mode=0o700, exist_ok=True) | ||
| environment = root / "venv" | ||
| with (root / "create.lock").open("w") as lock: | ||
| fcntl.flock(lock, fcntl.LOCK_EX) | ||
| if not (root / "complete").exists(): | ||
| venv.EnvBuilder(system_site_packages=True, with_pip=True, symlinks=True).create(environment) | ||
| (root / "complete").touch() | ||
| print(environment) | ||
| PY | ||
| ) || return 1 | ||
| export VIRTUAL_ENV="$INFX_DYNAMO_VENV" | ||
| export PATH="$VIRTUAL_ENV/bin:$PATH" | ||
| unset INFX_DYNAMO_VENV | ||
|
|
||
| # Keep transient package download failures inside SRT's existing install lock. | ||
| # Other pip invocations retain their original behavior. | ||
| pip() { | ||
| if [[ $# -ne 7 || "$1" != install || "$2" != --break-system-packages || | ||
| "$3" != --quiet || "$4" != --extra-index-url || | ||
| "$5" != https://pypi.nvidia.com || "$6" != ai-dynamo-runtime==?* || | ||
| "$7" != "ai-dynamo==${6#ai-dynamo-runtime==}" ]]; then | ||
| command pip "$@" | ||
| return $? | ||
| fi | ||
|
|
||
| local attempt install_status | ||
| for attempt in 1 2 3; do | ||
| if command pip "$@"; then | ||
| return 0 | ||
| else | ||
| install_status=$? | ||
| fi | ||
| if [[ "$attempt" -lt 3 ]]; then | ||
| echo "Dynamo install attempt $attempt failed; retrying unchanged packages." >&2 | ||
| sleep 5 || return $? | ||
| fi | ||
| done | ||
| return "$install_status" | ||
| } |
Oops, something went wrong.
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.
any chance u can remove these files?