Skip to content

Commit 9b7a1b1

Browse files
authored
Merge pull request #62 from JuliaMath/vs/macos13.4
Prepare for releasing with macOS 13.4
2 parents 909e943 + 378b808 commit 9b7a1b1

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- 'nightly'
1818
os:
1919
- macOS-13
20+
- macOS-12
2021
- ubuntu-latest
2122
- windows-latest
2223
arch:

Project.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ uuid = "13e28ba4-7ad8-5781-acae-3021b1ed3924"
33
version = "0.4.0"
44

55
[deps]
6-
LAPACK32_jll = "17f450c3-bd24-55df-bb84-8c51b4b939e3"
7-
LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14"
86
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
97
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
108

119
[compat]
1210
julia = "1.9"
13-
LAPACK32_jll = "3.11"
14-
LAPACK_jll = "3.11"
1511

1612
[extras]
1713
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The performance is significantly better than using standard libm functions in so
1111

1212
## OS Requirements
1313

14-
MacOS 13.3 is required in order to run AppleAccelerate.jl, especially for the libblastrampoline forwarding. On older MacOS versions, your mileage may vary.
14+
MacOS 13.4 is required in order to run AppleAccelerate.jl, especially for the libblastrampoline forwarding. On older MacOS versions, your mileage may vary.
1515

1616
## Supported Functions
1717

src/AppleAccelerate.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module AppleAccelerate
22

3-
using LinearAlgebra
4-
using Libdl, LAPACK_jll, LAPACK32_jll
3+
using LinearAlgebra, Libdl
4+
#using LAPACK_jll, LAPACK32_jll # Needed if use_external_lapack == true
55

66
# For now, only use BLAS from Accelerate (that is to say, vecLib)
77
global const libacc = "/System/Library/Frameworks/Accelerate.framework/Accelerate"
@@ -44,7 +44,7 @@ function load_accelerate(;clear::Bool = true, verbose::Bool = false, load_ilp64:
4444

4545
# Check to see if we can load ILP64 symbols
4646
if load_ilp64 && dlsym_e(libacc_hdl, "dgemm\$NEWLAPACK\$ILP64") == C_NULL
47-
error("Unable to load ILP64 interface from '$(libacc)'; You are running macOS version $(get_macos_version()), you need v13.3+")
47+
error("Unable to load ILP64 interface from '$(libacc)'; You are running macOS version $(get_macos_version()), you need v13.4+")
4848
end
4949

5050
# First, load :lp64 symbols, optionally clearing the current LBT forwarding tables
@@ -82,13 +82,13 @@ function get_macos_version()
8282
end
8383

8484
function __init__()
85-
# Default to loading the ILP64 interface on macOS 13.3+
85+
Sys.isapple() || return
8686
ver = get_macos_version()
87-
ver == nothing && return
88-
load_ilp64 = ver >= v"13.3"
89-
# dsptrf has a bug in the initial release of the $NEWLAPACK symbols, so if we're
90-
# on a version older than macOS 13.4, use an external LAPACK:
91-
load_accelerate(; load_ilp64, use_external_lapack = ver < v"13.4")
87+
# Default to loading the ILP64 interface on macOS 13.3+
88+
# dsptrf has a bug in the initial release of the $NEWLAPACK symbols in 13.3.
89+
# Thus use macOS 13.4 for ILP64 and a correct LAPACK
90+
ver < v"13.4" && return
91+
load_accelerate(; load_ilp64=true, use_external_lapack=false)
9292
end
9393

9494
if Sys.isapple()

test/runtests.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,15 @@ display(config.loaded_libs)
295295

296296
using Test
297297
@testset "Accelerate Forwarding Sanity Tests" begin
298-
@test LinearAlgebra.peakflops() > 0
299-
@test endswith(BLAS.lbt_find_backing_library("dgemm_", :lp64).libname, "Accelerate")
300-
@test endswith(BLAS.lbt_find_backing_library("dgemm_", :ilp64).libname, "Accelerate")
301-
302-
# Accelerate has `_rook` symbols:
303-
@test endswith(BLAS.lbt_find_backing_library("dsytrf_rook_", :ilp64).libname, "Accelerate")
298+
ver = AppleAccelerate.get_macos_version()
299+
if ver >= v"13.4"
300+
@test LinearAlgebra.peakflops() > 0
301+
@test endswith(BLAS.lbt_find_backing_library("dgemm_", :lp64).libname, "Accelerate")
302+
@test endswith(BLAS.lbt_find_backing_library("dgemm_", :ilp64).libname, "Accelerate")
303+
304+
# Accelerate has `_rook` symbols:
305+
@test endswith(BLAS.lbt_find_backing_library("dsytrf_rook_", :ilp64).libname, "Accelerate")
306+
end
304307
end
305308

306309
@testset "CBLAS dot test" begin

0 commit comments

Comments
 (0)