Commit 26a639c4 authored by Lasse Lensu's avatar Lasse Lensu
Browse files

Update for selecting a specific GPU

parent 48467054
......@@ -35,14 +35,18 @@ responsibly. If your computations do not require all the available GPUs consider
specifying $CUDA_VISIBLE_DEVICES variable in your environment, e.g., to set only
GPU with index 1 visible:
```
export CUDA_DEVICE_ORDER=PCI_BUS_ID
export CUDA_VISIBLE_DEVICES=1
```
or in python
```python
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="1"
```
(The environment variable $CUDA_DEVICE_ORDER makes the GPU IDs to be identical
with the command nvidia-smi.)
Some frameworks (e.g. TensorFlow) are greedy and they allocate resources on all
the available devices while utilizing only one of them effectively. By
explicitly specifying which GPU device you need you do not block other users
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment