BUG: Fix cblas detection for the wheel builds #24222
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a mess and doesn't attempt to fix the issues around gh-24200, but it should fix the issue of our wheels not using CBLAS.
The suffix may be directly injected into the flags to get the define and there is also a tangle between
HAVE_CBLAS
andHAVE_LAPACK
and we only probe the first.I tried this locally by checking that if the define exist redefining it to nonesense gives the slow version.
(I cannot test the full thing without a prefixed blas locally, because setting the prefix will not avoid blas use in LAPACK meaning you don't use CBLAS, but the blas symbols used by lapack are missing)
CC @mattip and @rgommers, I do not plan to attempt the "full" fix, it seems that may require untangling the way these things are set. I think this works, but we may have to give it a roll to be sure probably.