We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a1c42c commit c7954e8Copy full SHA for c7954e8
ext/NNlibAMDGPUExt/NNlibAMDGPUExt.jl
@@ -2,7 +2,6 @@ module NNlibAMDGPUExt
2
3
using Adapt
4
using AMDGPU
5
-using AMDGPU.MIOpen
6
using ChainRulesCore
7
using NNlib
8
using NNlib: BatchedAdjoint, BatchedTranspose, BatchedAdjOrTrans
@@ -53,9 +52,15 @@ function nnlib_padding(dims)
53
52
pd[1:2:end]
54
end
55
56
-include("conv.jl")
57
-include("pool.jl")
58
-include("softmax.jl")
59
-include("activations.jl")
+@static if AMDGPU.functional(:MIOpen)
+ using AMDGPU.MIOpen
+
+ include("conv.jl")
+ include("pool.jl")
60
+ include("softmax.jl")
61
+ include("activations.jl")
62
+else
63
+ @warn "ROCm MIOpen is not available for AMDGPU. NNlib has limited functionality for AMDGPU."
64
+end
65
66
0 commit comments