File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
23
23
Statistics = " 10745b16-79ce-11e8-11f9-7d13ad32a3b2"
24
24
StatsBase = " 2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
25
25
Zygote = " e88e6eb3-aa80-5325-afca-941959d7151f"
26
+ cuDNN = " 02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd"
26
27
27
28
[compat ]
28
29
AMDGPU = " 0.4.8"
@@ -42,6 +43,7 @@ Reexport = "0.2, 1.0"
42
43
SpecialFunctions = " 1.8.2, 2.1.2"
43
44
StatsBase = " 0.33"
44
45
Zygote = " 0.6.49"
46
+ cuDNN = " 1"
45
47
julia = " 1.6"
46
48
47
49
[extensions ]
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ using .Train
44
44
using . Train: setup
45
45
46
46
using CUDA
47
+ import cuDNN
47
48
const use_cuda = Ref {Union{Nothing,Bool}} (nothing )
48
49
49
50
using Adapt, Functors, OneHotArrays
Original file line number Diff line number Diff line change @@ -253,12 +253,16 @@ end
253
253
function check_use_cuda ()
254
254
if use_cuda[] === nothing
255
255
use_cuda[] = CUDA. functional ()
256
+ if use_cuda[] && ! cuDNN. has_cudnn ()
257
+ @warn " CUDA.jl found cuda, but did not find libcudnn. Some functionality will not be available." maxlog= 1
258
+ end
256
259
if ! (use_cuda[])
257
260
@info """ The GPU function is being called but the GPU is not accessible.
258
261
Defaulting back to the CPU. (No action is required if you want to run on the CPU).""" maxlog= 1
259
262
end
260
263
end
261
264
end
265
+
262
266
ChainRulesCore. @non_differentiable check_use_cuda ()
263
267
264
268
# Precision
You can’t perform that action at this time.
0 commit comments