You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/gpu.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -90,14 +90,14 @@ julia> x |> cpu
90
90
91
91
Sometimes it is required to control which GPUs are visible to `julia` on a system with multiple GPUs or disable GPUs entirely. This can be achieved with an environment variable `CUDA_VISIBLE_DEVICES`.
92
92
93
+
To disable all devices:
94
+
```
95
+
$ export CUDA_VISIBLE_DEVICES='-1'
96
+
```
97
+
To select specific devices by device id:
93
98
```
94
-
$ export CUDA_VISIBLE_DEVICES=''
95
-
96
-
# or
97
-
98
99
$ export CUDA_VISIBLE_DEVICES='0,1'
99
100
```
100
101
101
-
The environment variable `CUDA_VISIBLE_DEVICES` can also take a comma separated list of device IDs (`0,1,...`) which would be visible to CUDA related processes.
102
102
103
103
More information for conditional use of GPUs in CUDA.jl can be found in its [documentation](https://cuda.juliagpu.org/stable/installation/conditional/#Conditional-use), and information about the specific use of the variable is described in the [Nvidia CUDA blogpost](https://developer.nvidia.com/blog/cuda-pro-tip-control-gpu-visibility-cuda_visible_devices/).
0 commit comments