Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ DATASET_DIR=""
TIME="1:00:00"
RECIPES_DIR="tests/test_utils/recipes"
CONTAINER_MOUNTS=""
NO_GPUS_PER_TASK="FALSE"

# Declare associative array for tracking unique mounts
declare -A seen_mounts
Expand Down Expand Up @@ -53,6 +54,10 @@ while [[ $# -gt 0 ]]; do
TIME="$2"
shift 2
;;
--no-gpus-per-task)
NO_GPUS_PER_TASK="TRUE"
shift 1
;;
--help)
print_usage
exit 0
Expand Down Expand Up @@ -89,7 +94,7 @@ SRUN_CMD="srun \
--container-workdir=/opt/megatron-lm \
--container-mounts=$CONTAINER_MOUNTS \
--nodes=1 \
--gpus-per-task=8 \
$(if [ "$NO_GPUS_PER_TASK" = "FALSE" ]; then echo "--gpus-per-task=8"; fi) \
--time=$TIME \
--pty bash"

Expand Down
8 changes: 5 additions & 3 deletions tests/test_utils/python_scripts/generate_local_jobs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

"""Generate launch scripts for local execution.

This script allows to generate pre-filled launch scripts that allow for local execution of Megatron-LM functional tests inside containerized enviroments (i.e. Slurm enroot or Docker).
Expand All @@ -24,7 +26,9 @@ def load_script(config_path: str) -> str:

@click.command()
@click.option("--model", required=False, type=str, help="Filters all tests by matching model")
@click.option("--scope", required=False, type=str, help="Filters all tests by matching scope")
@click.option(
"--scope", required=False, type=str, default="mr", help="Filters all tests by matching scope"
)
@click.option(
"--test-case", required=False, type=str, help="Returns a single test-case with matching name."
)
Expand Down Expand Up @@ -77,8 +81,6 @@ def main(
container_tag="none",
)

print(workloads)

for workload in workloads:
if workload.type == "build":
continue
Expand Down
Loading