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
WIP: add support for BLAS and LAPACK dependencies #10921
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10921 +/- ##
==========================================
- Coverage 67.56% 64.79% -2.78%
==========================================
Files 414 416 +2
Lines 90145 90350 +205
Branches 21318 20721 -597
==========================================
- Hits 60909 58541 -2368
- Misses 24515 27350 +2835
+ Partials 4721 4459 -262
... and 162 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
This pull request introduces 2 alerts when merging 5c2bb31 into 7912901 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at this! Miscellaneous hodgepodge of review remarks that I found when taking a hurried glance (it's the holiday season right now):
|
Thanks for the quick feedback @eli-schwartz. Enjoy your holiday season! |
|
The |
642efd8
to
e8aeae1
Compare
|
As far as I could tell, adding keywords or methods/attributes to a dependency object is not allowed by design, and I should be using From that follows the current draft API: openblas_dep = dependency('openblas',
version : '>=0.3.21',
language: 'c', # can be c/cpp/fortran
modules: [
'interface: ilp64', # can be lp64 or ilp64 (or auto?)
'symbol-suffix: 64_', # check/auto-detect? default to 64_ or no suffix?
'cblas',
]
)
# Query properties as needed:
has_cblas = openblas.get_variable('cblas')
is_ilp64 = openblas_dep.get_variable('interface') == 'ilp64'
blas_symbol_suffix = openblas_dep.get_variable('symbol-suffix')It'd be great to get some feedback on this. I'll probably implement Netlib and MKL as well in this PR, because those are both quite different from OpenBLAS. So if the API works for all three, then that's a good sign. |
I would say returned object methods definitely should be avoided, and really in nearly all cases Adding keywords to meson/mesonbuild/interpreter/interpreter.py Lines 252 to 272 in b8e53ed
Many of these are even documented. 🤣 The rest are carefully disclaimed in the docs with:
I think my personal opinion on the matter is I'd like it if we could avoid new kwargs, but if it would be painful or gross without them, then we might as well add them. |
|
Thanks for the feedback!
I think we can. If we compare, e.g., I will continue down the current path then. Just a heads up that I won't have much time to work on this for the next 10 days or so. So I'll probably continue to enhance this PR after that, and then split off pieces that are ready into more digestible new PRs. |
Also fixes Mypy and flake8 issues [ci skip]
e1a3ca0
to
484833b
Compare
484833b
to
a01072d
Compare
[skip ci]
|
Will NumPy need 64-bit ILP64 OpenBLAS support for |
|
@tylerjereddy yes, but this one will be quick compared to dealing with the SIMD stuff. I've been too swamped with other topics, but I should revisit this in the near future. We'll probably miss the 1.25.0 release window and will have to do a 1.25.1/2 to complete the switchover, just like for SciPy (IIRC 1.9.3 was the first complete release without |
This is a start on implementing the BLAS and LAPACK support discussed in gh-2835.
This PR in its current form passes the added test case, and
dependency('openblas')works for me now with SciPy in 3 cases beyondpkg-config:lib/andinclude/dirs, but no pkg-config nor CMake installedThis is already nice to have in its current form, however there's a lot more to do. This includes dealing with 32 vs. 64 bit interfaces, supporting CBLAS and (maybe) LAPACKE, and implementing support for other implementations (MKL, Netlib, ATLAS, etc.). The docs I added try to sketch this out - I'm very much not sure about the API to expose here, some feedback would be great.
This is also the first time I'm implementing a new dependency, so I may have taken a few wrong turns. If there's better ways of doing any of this, I'd love to hear them.