Skip to content

Commit

Permalink
move gpu boost clock to gpu boostrap helper (awslabs#1827)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwvela authored and atmosx committed Jun 18, 2024
1 parent 55bb7e4 commit f079d96
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions templates/al2/runtime/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -642,38 +642,4 @@ systemctl daemon-reload
systemctl enable kubelet
systemctl start kubelet

# gpu boost clock
if command -v nvidia-smi &> /dev/null; then
log "INFO: nvidia-smi found"

nvidia-smi -q > /tmp/nvidia-smi-check
if [[ "$?" == "0" ]]; then
sudo nvidia-smi -pm 1 # set persistence mode
sudo nvidia-smi --auto-boost-default=0

GPUNAME=$(nvidia-smi -L | head -n1)
log "INFO: GPU name: $GPUNAME"

# set application clock to maximum
if [[ $GPUNAME == *"A100"* ]]; then
nvidia-smi -ac 1215,1410
elif [[ $GPUNAME == *"V100"* ]]; then
nvidia-smi -ac 877,1530
elif [[ $GPUNAME == *"K80"* ]]; then
nvidia-smi -ac 2505,875
elif [[ $GPUNAME == *"T4"* ]]; then
nvidia-smi -ac 5001,1590
elif [[ $GPUNAME == *"M60"* ]]; then
nvidia-smi -ac 2505,1177
elif [[ $GPUNAME == *"H100"* ]]; then
nvidia-smi -ac 2619,1980
else
echo "unsupported gpu"
fi
else
log "ERROR: nvidia-smi check failed!"
cat /tmp/nvidia-smi-check
fi
fi

log "INFO: complete!"

0 comments on commit f079d96

Please sign in to comment.