Skip to content

Conversation

@giordano
Copy link
Member

This PR also

  • drops a patch (deps/patches/neoverse-generic-kernels.patch) not needed anymore for an old bug fixed upstream in OpenBLAS. This results in ~5x speedup in the computation of BLAS.nrm2 (and hence LinearAlgebra.norm for vectors longer than LinearAlgebra.NRM2_CUTOFF (== 32) elements) when the neoversen1 kernels are used, e.g. by default on all Apple Silicon CPUs
  • adds a regression test for the above bug
  • updates other patches when building openblas from source

Corresponding PR in Yggdrasil: JuliaPackaging/Yggdrasil#7202. CC: @imciner2.

@giordano giordano added building Build system, or building Julia or its dependencies linear algebra Linear algebra external dependencies Involves LLVM, OpenBLAS, or other linked libraries JLLs labels Jan 26, 2024
@giordano giordano requested a review from ViralBShah January 26, 2024 00:42
@imciner2
Copy link
Contributor

We also have a new SVE patch in Yggdrasil: https://github.com/JuliaPackaging/Yggdrasil/blob/master/O/OpenBLAS/OpenBLAS%400.3.26/bundled/patches/90-darwin-sve.patch that I don't see included here. It is needed for the Apple aarch64 BFloat enabled builds.

The new build also includes patches to

* improve multithreading
* fix builds of BFloat16 kernels on AVX512BF16
…alues

This would have caught an old upstream bug in OpenBLAS, which was later fixed in
v0.3.14.
@giordano
Copy link
Member Author

Oops, added, thanks!

@giordano giordano merged commit 5d4d6ab into JuliaLang:master Jan 26, 2024
@giordano giordano deleted the mg/openblas branch January 26, 2024 10:18
@ctkelley
Copy link

ctkelley commented Jan 26, 2024

Once this is in the nightly, how do I make BLAS calls? Is there a bgemm out there. I'm pretty sure that @timothyaldendavis cares too

@ViralBShah
Copy link
Member

Yeah you can just ccall those functions, but you will need to use the types from BFloat16s.jl etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

building Build system, or building Julia or its dependencies external dependencies Involves LLVM, OpenBLAS, or other linked libraries JLLs linear algebra Linear algebra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants