TensorRT-LLMs/examples/layer_wise_benchmarks/slurm_launch.sh
Tailing Yuan 4345636b04
[None][chore] Clean up layer-wise benchmarks code (#11092)
Signed-off-by: Tailing Yuan <yuantailing@gmail.com>
2026-01-29 14:29:37 -05:00

24 lines
522 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
CONTAINER_NAME=${CONTAINER_NAME:-layer_wise_benchmarks}
TRTLLM_ROOT=$(realpath -- "$(dirname -- "$0")"/../..)
CONTAINER_MOUNTS="$TRTLLM_ROOT:$TRTLLM_ROOT"
if [ -z "${SLURM_JOB_ID:-}" ]; then
echo "Please set SLURM_JOB_ID"
exit 1
fi
WORKDIR=$(realpath -- "$(pwd)")
set -x
srun --mpi=pmix \
-N "$NODES" \
--ntasks-per-node $((NP / NODES)) \
--container-name "$CONTAINER_NAME" \
--container-mounts "$CONTAINER_MOUNTS" \
--container-workdir "$WORKDIR" \
"$@"