Skip to content

Commit 0ef7098

Browse files
authored
Import CpuId only on x86_64 or i686 (#521)
* CpuId can only be loaded on x86 * Bump patch * ignore CpuId for statle deps
1 parent 8639ca8 commit 0ef7098

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LinearSolve"
22
uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
33
authors = ["SciML"]
4-
version = "2.31.0"
4+
version = "2.31.1"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/LinearSolve.jl

+8-5
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ import PrecompileTools
4141
import Krylov
4242
using SciMLBase
4343
import Preferences
44-
import CpuId
45-
4644
const CRC = ChainRulesCore
4745

48-
if Preferences.@load_preference("LoadMKL_JLL", !occursin("EPYC", CpuId.cpubrand()))
49-
using MKL_jll
50-
const usemkl = MKL_jll.is_available()
46+
@static if Sys.ARCH === :x86_64 || Sys.ARCH === :i686
47+
import CpuId
48+
if Preferences.@load_preference("LoadMKL_JLL", !occursin("EPYC", CpuId.cpubrand()))
49+
using MKL_jll
50+
const usemkl = MKL_jll.is_available()
51+
else
52+
const usemkl = false
53+
end
5154
else
5255
const usemkl = false
5356
end

test/qa.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using LinearSolve, Aqua
66
Aqua.test_piracies(LinearSolve,
77
treat_as_own = [LinearProblem])
88
Aqua.test_project_extras(LinearSolve)
9-
Aqua.test_stale_deps(LinearSolve, ignore = [:MKL_jll])
9+
Aqua.test_stale_deps(LinearSolve, ignore = [:MKL_jll, :CpuId])
1010
Aqua.test_unbound_args(LinearSolve)
1111
Aqua.test_undefined_exports(LinearSolve)
1212
end

0 commit comments

Comments
 (0)