Skip to content

Commit

Permalink
Import CpuId only on x86_64 or i686 (#521)
Browse files Browse the repository at this point in the history
* CpuId can only be loaded on x86

* Bump patch

* ignore CpuId for statle deps
  • Loading branch information
chriselrod authored Jul 30, 2024
1 parent 8639ca8 commit 0ef7098
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LinearSolve"
uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
authors = ["SciML"]
version = "2.31.0"
version = "2.31.1"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
13 changes: 8 additions & 5 deletions src/LinearSolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ import PrecompileTools
import Krylov
using SciMLBase
import Preferences
import CpuId

const CRC = ChainRulesCore

if Preferences.@load_preference("LoadMKL_JLL", !occursin("EPYC", CpuId.cpubrand()))
using MKL_jll
const usemkl = MKL_jll.is_available()
@static if Sys.ARCH === :x86_64 || Sys.ARCH === :i686
import CpuId
if Preferences.@load_preference("LoadMKL_JLL", !occursin("EPYC", CpuId.cpubrand()))
using MKL_jll
const usemkl = MKL_jll.is_available()
else
const usemkl = false
end
else
const usemkl = false
end
Expand Down
2 changes: 1 addition & 1 deletion test/qa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using LinearSolve, Aqua
Aqua.test_piracies(LinearSolve,
treat_as_own = [LinearProblem])
Aqua.test_project_extras(LinearSolve)
Aqua.test_stale_deps(LinearSolve, ignore = [:MKL_jll])
Aqua.test_stale_deps(LinearSolve, ignore = [:MKL_jll, :CpuId])
Aqua.test_unbound_args(LinearSolve)
Aqua.test_undefined_exports(LinearSolve)
end

0 comments on commit 0ef7098

Please sign in to comment.