ci: extract cuda stage actions + runner_config mapping (#25138)
Co-authored-by: Alison Shao <54658187+alisonshao@users.noreply.github.com>
This commit is contained in:
co-authored by
Alison Shao
parent
fd889097dc
commit
85d9c77c57
@@ -0,0 +1,27 @@
|
||||
"""Emit a runner_config's setup details (install / artifact_version /
|
||||
install_timeout) in $GITHUB_OUTPUT format. Reads scripts/ci/runner_configs.yml.
|
||||
Called by .github/workflows/_pr-test-stage.yml.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import yaml
|
||||
|
||||
_YAML_PATH = os.path.join(os.path.dirname(__file__), "runner_configs.yml")
|
||||
|
||||
|
||||
def load() -> dict:
|
||||
with open(_YAML_PATH) as f:
|
||||
return yaml.safe_load(f)["runner_configs"]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
sys.exit("usage: runner_configs.py <runner_config>")
|
||||
rc = sys.argv[1]
|
||||
config = load().get(rc)
|
||||
if config is None:
|
||||
sys.exit(f"unknown runner_config: {rc!r}")
|
||||
for key, value in config.items():
|
||||
print(f"{key}={value}")
|
||||
@@ -0,0 +1,26 @@
|
||||
# Per-runner-config CUDA setup details. Single source of truth for the
|
||||
# `runner_config` field on `register_cuda_ci(...)` calls. Consumed by
|
||||
# scripts/ci/runner_configs.py (CLI wrapper), which is in turn called by
|
||||
# .github/workflows/_pr-test-stage.yml.
|
||||
#
|
||||
# Each runner_config carries install script, actions/download-artifact major
|
||||
# version, and install-step wall-clock cap (minutes, enforced via
|
||||
# `timeout-minutes:` on the install step in _pr-test-stage.yml).
|
||||
|
||||
_anchors:
|
||||
default_install: &default scripts/ci/cuda/ci_install_dependency.sh
|
||||
deepep_install: &deepep scripts/ci/cuda/ci_install_deepep.sh
|
||||
dsv4_install: &dsv4 scripts/ci/cuda/ci_install_dsv4_dep.sh
|
||||
|
||||
runner_configs:
|
||||
1-gpu-small: { install: *default, artifact_version: v4, install_timeout: "20" }
|
||||
1-gpu-large: { install: *default, artifact_version: v4, install_timeout: "20" }
|
||||
2-gpu-large: { install: *default, artifact_version: v4, install_timeout: "20" }
|
||||
4-gpu-b200: { install: *default, artifact_version: v6, install_timeout: "20" }
|
||||
4-gpu-h100: { install: *default, artifact_version: v4, install_timeout: "20" }
|
||||
8-gpu-h200: { install: *default, artifact_version: v4, install_timeout: "20" }
|
||||
8-gpu-h20: { install: *deepep, artifact_version: v4, install_timeout: "20" }
|
||||
deepep-4-gpu-h100: { install: *deepep, artifact_version: v4, install_timeout: "20" }
|
||||
deepep-8-gpu-h200: { install: *deepep, artifact_version: v4, install_timeout: "20" }
|
||||
dsv4-4-gpu-b200: { install: *dsv4, artifact_version: v6, install_timeout: "30" }
|
||||
dsv4-8-gpu-h200: { install: *dsv4, artifact_version: v4, install_timeout: "30" }
|
||||
Reference in New Issue
Block a user