Skip to content

Commit

Permalink
Default preference for MKL checks if Ryzen
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Jul 28, 2024
1 parent 844253c commit 74f11ea
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/LinearSolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ import PrecompileTools

const CRC = ChainRulesCore

if Preferences.@load_preference("LoadMKL_JLL", true)
# Check if Ryzen, since that's where MKL is slow
function is_zen()
# znverX
n = Sys.CPU_NAME
length(n) == 6 || return false
return n[1] == 'z' && n[2] == 'n' && n[3] == 'v' &&
n[4] == 'e' && n[5] == 'r'
end

@static if Preferences.@load_preference("LoadMKL_JLL", is_zen())
using MKL_jll
const usemkl = MKL_jll.is_available()
else
Expand Down

0 comments on commit 74f11ea

Please sign in to comment.