Skip to content

ARM64: Enable bfloat16 kernels by default #5396

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

Merged

Conversation

abhishek-iitmadras
Copy link
Contributor

This patch enables bfloat16 kernels by default for ARM64 processors.

@martin-frbg
Copy link
Collaborator

Can get rid of the "duplicate -lgfortran" error by using $(filter-out -lgfortran,$(EXTRALIB)) instead of $(EXTRALIB) in the build commands but it's not immediately clear to me why this comes up now

@abhishek-iitmadras
Copy link
Contributor Author

abhishek-iitmadras commented Jul 28, 2025

Can get rid of the "duplicate -lgfortran" error by using $(filter-out -lgfortran,$(EXTRALIB)) instead of $(EXTRALIB) in the build commands but it's not immediately clear to me why this comes up now

  • the macOS + make jobs link the BLAS regression tests (test_bgemv, test_sbgemv, …) with Apple clang without telling the linker where Home-brew’s libgfortran.dylib lives.
    The Home-brew path /opt/homebrew/Cellar/gcc//lib/gcc/current is not searched by default, so ld64 aborts with ld: library 'gfortran' not found.

  • The duplicate -lgfortran notice is only a warning; the link fails because the library is missing, not because it appears twice.

@martin-frbg
Copy link
Collaborator

Right, thanks. Filtering out the redundant -lgfortran did appear to work as well - but I haven't checked where the "other" instance of -lgfortran is coming from (must be from f_check's querying of Fortran dependencies, if it happens to have the correct -L as well). So not sure what's going to be the final solution (seems that the homebrew script does not add the Cellar path to the LIBRARY_PATH by default, so this could be a gotcha for others too). That's unrelated to your PR though, so merging - thank you.

@martin-frbg martin-frbg added this to the 0.3.31 milestone Jul 28, 2025
@martin-frbg martin-frbg merged commit a5e7c0e into OpenMathLib:develop Jul 28, 2025
84 of 88 checks passed
@abhishek-iitmadras abhishek-iitmadras deleted the abhishekk_bfloat16 branch July 29, 2025 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants