Support n_gpus=0 models and native baremetal launcher#82
Open
raviguptaamd wants to merge 2 commits intoROCm:raviguptaamd/update_slurm_launcherfrom
Open
Support n_gpus=0 models and native baremetal launcher#82raviguptaamd wants to merge 2 commits intoROCm:raviguptaamd/update_slurm_launcherfrom
raviguptaamd wants to merge 2 commits intoROCm:raviguptaamd/update_slurm_launcherfrom
Conversation
- Add "native" to BAREMETAL_LAUNCHERS so scripts using the native launcher run directly on the host instead of inside Docker - Skip GPU argument generation when n_gpus=0 - Propagate user-provided GPU context keys (MAD_SYSTEM_NGPUS, etc.) from additional_context into docker_env_vars to short-circuit hardware detection on headless nodes - Fast-path in init_gpu_context: skip all GPU hardware probes when MAD_SYSTEM_NGPUS=0 (no rocminfo, nvidia-smi, renderD detection) Enables running non-GPU workloads like RDMA bandwidth tests from machines without GPU hardware.
- Set top-level ctx["gpu_vendor"] in n_gpus=0 fast path so run_container() doesn't KeyError before reaching the baremetal check - Move baremetal launcher detection before Docker options setup so native launcher skips gpu_vendor/Docker code entirely - Propagate top-level additional_context string values as env vars to baremetal scripts (e.g. KUBECONFIG_PATH)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
"native"toBAREMETAL_LAUNCHERSso scripts can run directly on the host without DockerMAD_SYSTEM_NGPUS=0— enables running network-only tests (RDMA bandwidth) from headless machines that manage GPU nodes via kubectladditional_contextintodocker_env_varsto short-circuit hardware probesChanges
src/madengine/execution/container_runner.py"native"toBAREMETAL_LAUNCHERSlistget_gpu_arg()whenrequested_gpus == "0"src/madengine/core/context.pyinit_gpu_context(): skiprocminfo/nvidia-smiwhenMAD_SYSTEM_NGPUS=0MAD_GPU_VENDOR,MAD_SYSTEM_NGPUS,MAD_SYSTEM_GPU_ARCHITECTURE, etc. fromadditional_contextintodocker_env_varsMotivation
The RDMA bandwidth tests in MAD-private (ROCm/MAD-private#200) use
n_gpus: "0"andlauncher: "native"because the launch machine orchestrates K8s pods remotely — it doesn't need local GPUs or Docker.Test plan
madengine build+runwithn_gpus=0andnativelauncher on a headless machineMAD_SYSTEM_NGPUS=0)