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.
2 parents 1348828 + 576dca9 commit 656175dCopy full SHA for 656175d
src/functor.jl
@@ -187,16 +187,9 @@ _isbitsarray(x) = false
187
_isleaf(::AbstractRNG) = true
188
_isleaf(x) = _isbitsarray(x) || Functors.isleaf(x)
189
190
-const GPU_BACKEND_ORDER = sort(
191
- Dict(
192
- "CUDA" => 1,
193
- "AMD" => 2,
194
- "Metal" => 3,
195
- "CPU" => 4,
196
- ),
197
- byvalue = true
198
-)
199
-const GPU_BACKENDS = tuple(collect(keys(GPU_BACKEND_ORDER))...)
+# the order below is important
+const GPU_BACKENDS = ["CUDA", "AMD", "Metal", "CPU"]
+const GPU_BACKEND_ORDER = Dict(collect(zip(GPU_BACKENDS, 1:length(GPU_BACKENDS))))
200
const GPU_BACKEND = @load_preference("gpu_backend", "CUDA")
201
202
function gpu_backend!(backend::String)
0 commit comments