Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenBLAS_jll] Update to new build with BFloat16 kernels #53059

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

giordano
Copy link
Contributor

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
Contributor Author

Oops, added, thanks!

@giordano giordano merged commit 5d4d6ab into JuliaLang:master Jan 26, 2024
7 checks passed
@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