forked from Clarifai/coreos-nvidia
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust performance settings for Tesla V100 GPUs.
- Loading branch information
1 parent
286b0fe
commit ca4c373
Showing
6 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=NVIDIA Settings Configuration for performance | ||
Wants=local-fs.target | ||
StartLimitIntervalSec=0 | ||
|
||
[Service] | ||
Type=simple | ||
StandardOutput=journal+console | ||
StandardError=journal+console | ||
Restart=on-failure | ||
RestartSec=1 | ||
ExecStart=/bin/bash /opt/bin/nvidia-configure-settings.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
PERSISTENCE_MODE=$(/opt/bin/nvidia-smi --query-gpu=persistence_mode --format=csv | sed -n 2p | awk '{print $1}') | ||
if [ "$PERSISTENCE_MODE" != "Enabled" ] | ||
then | ||
echo "Setting performance settings requires persistence mode to be enabled. Exiting..." | ||
exit -1 | ||
fi | ||
|
||
GPU_CHIP_NAME=$(/opt/bin/nvidia-smi --query-gpu=gpu_name --format=csv | sed -n 2p | awk '{print $2}') | ||
if [ "$GPU_CHIP_NAME" = "V100-SXM2-16GB" ] | ||
then | ||
echo "Detected a Tesla V100-SXM2-16GB chip. Setting clocks as suggested by AWS Documentation for P3 instances." | ||
/opt/bin/nvidia-smi -ac 877,1530 | ||
else | ||
#Not a Tesla V100 GPU. Try turning off auto-boost at least, given we don't know max clocks... | ||
/opt/bin/nvidia-smi --auto-boost-default=0 | ||
fi | ||
|
||
echo "NVIDIA performance configuration complete." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
[Unit] | ||
Description=NVIDIA Persistence Daemon | ||
Wants=local-fs.target | ||
After=nvidia-start.service | ||
|
||
[Service] | ||
Type=forking | ||
StandardOutput=journal+console | ||
StandardError=journal+console | ||
PIDFile=/var/run/nvidia-persistenced/nvidia-persistenced.pid | ||
Restart=always | ||
RestartSec=2 | ||
ExecStart=/opt/bin/nvidia-persistenced --user nvidia-persistenced --persistence-mode --verbose | ||
ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters