Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing deprecated method call in GPU_BACKEND_ORDER. #2314

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/functor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,9 @@ _isbitsarray(x) = false
_isleaf(::AbstractRNG) = true
_isleaf(x) = _isbitsarray(x) || Functors.isleaf(x)

const GPU_BACKEND_ORDER = sort(
Dict(
"CUDA" => 1,
"AMD" => 2,
"Metal" => 3,
"CPU" => 4,
),
byvalue = true
)
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))))
const GPU_BACKEND = @load_preference("gpu_backend", "CUDA")

function gpu_backend!(backend::String)
Expand Down
Loading