TensorRT-LLMs/examples/layer_wise_benchmarks/slurm_launch.sh
Tailing Yuan f9c7786dc8
[None][feat] Add layer wise benchmarks (#8777)
Signed-off-by: Tailing Yuan <yuantailing@gmail.com>
2025-10-30 20:29:34 +08:00

23 lines
496 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
CONTAINER_NAME=${CONTAINER_NAME:-layer_wise_benchmarks}
CONTAINER_MOUNTS=$(realpath "$(pwd)/../.."):$(realpath "$(pwd)/../..")
if [ "${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" \
"$@"