Skip to content
Snippets Groups Projects
Commit 3c82f08f authored by Xuan Gu's avatar Xuan Gu
Browse files

Update 2 files

- /PyTorch/Segmentation/nnUNet/submit_benchmark_sbatch.sh
- /PyTorch/Segmentation/nnUNet/run_benchmark_single_node.sh
parent b555aa6f
No related branches found
No related tags found
No related merge requests found
......@@ -4,9 +4,9 @@ MODULE_NAME=nnunet_for_pytorch
MODULE_VERSION=21.11.0
WORK_DIR=/proj/nsc_testing/xuan/berzelius-benchmarks/PyTorch/Segmentation/nnUNet
CONTAINER_DIR=/proj/nsc_testing/xuan/containers/${MODULE_NAME}_${MODULE_VERSION}.sif
SBATCH_DIR=$WORK_DIR/sbatch_scripts/benchmark_dim${1}_nodes${2}_gpus${3}_batchsize${4}_iteration${5}.sbatch
SBATCH_OUT_DIR=$WORK_DIR/sbatch_out/benchmark_dim${1}_nodes${2}_gpus${3}_batchsize${4}_iteration${5}.out
LOG_DIR=benchmark_dim${1}_nodes${2}_gpus${3}_batchsize${4}_amp_iteration${5}.json
SBATCH_DIR=$WORK_DIR/sbatch_scripts/benchmark_${5}_dim${1}_nodes${2}_gpus${3}_batchsize${4}.sbatch
SBATCH_OUT_DIR=$WORK_DIR/sbatch_out/benchmark_${5}_dim${1}_nodes${2}_gpus${3}_batchsize${4}.out
LOG_DIR=benchmark_${5}_dim${1}_nodes${2}_gpus${3}_batchsize${4}_amp.json
mkdir -p $WORK_DIR/sbatch_out $WORK_DIR/sbatch_scripts
cat <<EOT > $SBATCH_DIR
......@@ -25,7 +25,7 @@ WORK_DIR=/proj/nsc_testing/xuan/berzelius-benchmarks/PyTorch/Segmentation/nnUNet
CONTAINER_DIR=/proj/nsc_testing/xuan/containers/${MODULE_NAME}_${MODULE_VERSION}.sif
rm -f $WORK_DIR/results/$LOG_DIR
apptainer exec --nv -B ${WORK_DIR}/data:/data -B ${WORK_DIR}/results:/results --pwd /workspace/nnunet_pyt $CONTAINER_DIR python scripts/benchmark.py --mode train --gpus ${3} --dim ${1} --batch_size ${4} --amp --logname='$LOG_DIR'
apptainer exec --nv -B ${WORK_DIR}/data:/data -B ${WORK_DIR}/results:/results --pwd /workspace/nnunet_pyt $CONTAINER_DIR python scripts/benchmark.py --mode ${5} --gpus ${3} --dim ${1} --batch_size ${4} --amp --logname='$LOG_DIR'
EOT
......
......@@ -2,17 +2,18 @@
set -e
WORK_DIR=/proj/nsc_testing/xuan/berzelius-benchmarks/PyTorch/Segmentation/nnUNet
benchmark_modes=("train" "predic")
dim=2
for nodes in {1..1}; do
for gpus in {1,8}; do
for batch_size in 256; do
for iteration in {1..1}; do
for benchmark_mode in "${benchmark_modes[@]}"; do
echo dim ${dim}, nodes ${nodes}, gpus ${gpus}, batch_size ${batch_size}, iteration ${iteration}
echo dim ${dim}, nodes ${nodes}, gpus ${gpus}, batch_size ${batch_size}, benchmark_mode ${benchmark_mode}
# For single node
bash $WORK_DIR/run_benchmark_single_node.sh ${dim} ${nodes} ${gpus} ${batch_size} ${iteration}
bash $WORK_DIR/run_benchmark_single_node.sh ${dim} ${nodes} ${gpus} ${batch_size} ${benchmark_mode}
sleep 1
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment