Skip to content

Commit 9c789dc

Browse files
bors[bot]DhairyaLGandhiToucheSir
authored
Merge #1835 #1836
1835: Document disabling GPUs r=DhairyaLGandhi a=DhairyaLGandhi From the discussion in #1834 1836: Try using latest cu(DNN) binaries r=DhairyaLGandhi a=ToucheSir Possible alternative to #1822. Co-authored-by: Dhairya Gandhi <dhairya@juliacomputing.com> Co-authored-by: Brian Chen <ToucheSir@users.noreply.github.com>
3 parents 79dbbd6 + 8608107 + 6e3ca67 commit 9c789dc

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ steps:
1717
agents:
1818
queue: "juliagpu"
1919
cuda: "*"
20+
env:
21+
JULIA_CUDA_USE_BINARYBUILDER: "true"
2022
timeout_in_minutes: 60
2123

2224
# - label: "GPU nightly"

docs/src/gpu.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,19 @@ julia> x |> cpu
8585
8686
0.192538
8787
```
88+
89+
## Disabling CUDA or choosing which GPUs are visible to Flux
90+
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+
93+
```
94+
$ export CUDA_VISIBLE_DEVICES=''
95+
96+
# or
97+
98+
$ export CUDA_VISIBLE_DEVICES='0,1'
99+
```
100+
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+
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/).

test/cuda/layers.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ function gpu_gradtest(name::String, layers::Vector, x_cpu = nothing, args...; te
4545

4646
# test
4747
if test_cpu
48-
if VERSION >= v"1.7" && layer === GroupedConvTranspose && args[end] == selu
49-
@test_broken y_gpu y_cpu rtol=1f-3 atol=1f-3
50-
else
51-
@test y_gpu y_cpu rtol=1f-3 atol=1f-3
52-
end
48+
@test y_gpu y_cpu rtol=1f-3 atol=1f-3
5349
if isnothing(xg_cpu)
5450
@test isnothing(xg_gpu)
5551
else

0 commit comments

Comments
 (0)