summaryrefslogtreecommitdiffstats
path: root/templates/cuda_init.sh.j2
blob: 3c85ea2612d1680bed232b410932c091fd09c501 (plain)
1
2
3
4
5
6
7
8
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