-
Notifications
You must be signed in to change notification settings - Fork 171
[LAPACK] Dynamically load reference lapack library for tests. #701
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
base: develop
Are you sure you want to change the base?
Conversation
…conflicting symbols
…ry to find cblas when lapacke_root is given
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.
This all looks good. Thanks for the changes!
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 the changes! I only have some minor comments.
One more thing is that the original inconsistency (reference_blas_templates.hpp
in BLAS and lapack_reference_wrappers.hpp
in LAPACK) now leads to:
reference_blas_templates.hpp
includesreference_blas_wrappers.hpp
in BLASlapack_reference_wrappers.hpp
includeslapack_reference_templates.hpp
in LAPACK
I will leave this for @andrewtbarker to decide if we need alignment.
I agree that the inconsistency is not ideal, but I don't feel strongly about the exact file names. |
Description
Lapack tests suffered same issue as BLAS tests which was reported in #204 and fixed in #251 . If a backend uses the same LAPACKE interface and symbols as the reference LAPACK, it will end up comparing only the first found library to itself.
This basically copies #251 solution by using dlopen each time the reference library symbols are needed instead of linking to the library directly.
In the process of testing this, I noticed that Lapack tests were not exactly working if only the lapack backend is built, as it depends on the BLAS library as well for accuracy checks. A second commit was added to make Lapack tests work alone, by checking that BLAS reference library can be found even if BLAS backend is not built. It also adds REF_LAPACK_ROOT in the search path for BLAS library, as in the reference design all blas/lapack libraries are in the same location (this avoids having to provide both REF_LAPACK_ROOT and REF_BLAS_ROOT in this case).
100% tests passed, 0 tests failed out of 796