JuliaLinearAlgebra / AppleAccelerate.jl

Julia interface to the macOS Accelerate framework
Other
96 stars 18 forks source link

`peakflops` not showing any difference with loading `AppleAccelerate` #65

Closed jamblejoe closed 7 months ago

jamblejoe commented 8 months ago

see e.g.

julia> peakflops(4096)
6.095799831981197e10

julia> using AppleAccelerate

julia> peakflops(4096)
6.073612665240428e10

but calling the explicit functions in AppleAccelerate does seem to work and results in a speed difference

julia> using BenchmarkTools

julia> X = randn(1_000_000);

julia> @btime exp.($X); # standard libm function
  5.061 ms (2 allocations: 7.63 MiB)

julia> @btime AppleAccelerate.exp($X);
  2.003 ms (2 allocations: 7.63 MiB)

Systeminfo:

julia> versioninfo()
Julia Version 1.9.3
Commit bed2cd540a1 (2023-08-24 14:43 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores

julia> 
AppleAccelerate v0.4.0
jamblejoe commented 7 months ago

peakflops started to work as expected, when I upgraded from 13.0 to 14.1.