diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-07-05 16:22:58 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-07-05 16:22:58 +0200 |
commit | 813756495d5ef33fa3cc95d69b6d88418ebe7bb1 (patch) | |
tree | d923e31d8407c9d8c04407a1224ff1afa4be2a91 /templates/cuda_init.sh.j2 | |
download | itm-813756495d5ef33fa3cc95d69b6d88418ebe7bb1.tar.gz itm-813756495d5ef33fa3cc95d69b6d88418ebe7bb1.tar.bz2 itm-813756495d5ef33fa3cc95d69b6d88418ebe7bb1.tar.xz itm-813756495d5ef33fa3cc95d69b6d88418ebe7bb1.zip |
Squashed 'roles/cuda/' content from commit f82a4fe
git-subtree-dir: roles/cuda
git-subtree-split: f82a4fedb62a410b1f05454ee5ba5f2e5ff0a16c
Diffstat (limited to 'templates/cuda_init.sh.j2')
-rw-r--r-- | templates/cuda_init.sh.j2 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/cuda_init.sh.j2 b/templates/cuda_init.sh.j2 new file mode 100644 index 0000000..3c85ea2 --- /dev/null +++ b/templates/cuda_init.sh.j2 @@ -0,0 +1,9 @@ +#!/bin/bash +# During boot we initialize the GPUs (creates /dev/nvidia*) + +if [ ! -f "/usr/bin/nvidia-smi" ]; then + logger -s -t nvidia-smi "Script $0 could not find /usr/bin/nvidia-smi" +else + /usr/bin/nvidia-smi --compute-mode={{ cuda_init_compute_mode }} + /usr/bin/nvidia-smi --persistence-mode={{ cuda_init_persistence_mode }} +fi |