32
32
Load Accelerate, replacing the current LBT forwarding tables if `clear` is `true`.
33
33
Attempts to load the ILP64 symbols if `load_ilp64` is `true`, and errors out if unable.
34
34
"""
35
- function load_accelerate (;clear:: Bool = true , verbose:: Bool = false , load_ilp64:: Bool = true )
35
+ function load_accelerate (;clear:: Bool = true , verbose:: Bool = false , load_ilp64:: Bool = true , use_external_lapack :: Bool = true )
36
36
# Silently exit on non-Accelerate-capable platforms
37
37
@static if ! Sys. isapple ()
38
38
return
@@ -44,7 +44,7 @@ function load_accelerate(;clear::Bool = true, verbose::Bool = false, load_ilp64:
44
44
45
45
# Check to see if we can load ILP64 symbols
46
46
if load_ilp64 && dlsym_e (libacc_hdl, " dgemm\$ NEWLAPACK\$ ILP64" ) == C_NULL
47
- error (" Unable to load ILP64 interface from '$(libacc) '; are you running macOS 13 .3+? " )
47
+ error (" Unable to load ILP64 interface from '$(libacc) '; You are running macOS version $( get_macos_version ()) , you need v13 .3+" )
48
48
end
49
49
50
50
# First, load :lp64 symbols, optionally clearing the current LBT forwarding tables
@@ -53,11 +53,6 @@ function load_accelerate(;clear::Bool = true, verbose::Bool = false, load_ilp64:
53
53
forward_accelerate (:ilp64 ; new_lapack= true , verbose)
54
54
end
55
55
56
- # dsptrf has a bug in the current $NEWLAPACK symbols; to work around this, we
57
- # overlay an external LAPACK_jll on top. Eventually, we may read in the
58
- # Info.plist, determine the version, and stop doing this.
59
- use_external_lapack = true
60
-
61
56
# Next, load an external LAPACK, if requested
62
57
if use_external_lapack
63
58
if load_ilp64
@@ -90,7 +85,9 @@ function __init__()
90
85
# Default to loading the ILP64 interface on macOS 13.3+
91
86
ver = get_macos_version ()
92
87
load_ilp64 = ver != = nothing && ver >= v " 13.3"
93
- load_accelerate (; load_ilp64)
88
+ # dsptrf has a bug in the initial release of the $NEWLAPACK symbols, so if we're
89
+ # on a version older than macOS 13.4, use an external LAPACK:
90
+ load_accelerate (; load_ilp64, use_external_lapack = ver < v " 13.4" )
94
91
end
95
92
96
93
end # module
0 commit comments