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

FIX check symbols to better identify supported libraries #151

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

jeremiedbb
Copy link
Collaborator

Fixes #149

This PR proposes to check that at least 1 of the symbols we're looking for exists the make sure that a library having a matching prefix is actually a supported library (and not a library with a common prefix).

We can't really check that all symbols exist because:

  • libs can come with a different set of symbols (e.g. OpenBLAS built for 64bit)
  • libs may not expose all the symbols depending of their version, in which case we only show the info we're able to gather.

I'm not sure it's worth trying to install a library the used to trigger the bug in our CI just to test that. I did not find an easy way to install bliss for instance (at least, the way I found didn't come with a libbliss dso)...

Copy link
Contributor

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the following question, LGTM!

return "openmp"
elif self.dynlib.bli_info_get_enable_pthreads():
elif getattr(self.dynlib, "bli_info_get_enable_pthreads", lambda: False)():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why False instead of None?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I want to return a bool since it's passed to elif

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I misread the line.

@ogrisel ogrisel merged commit 85d329a into joblib:master Oct 10, 2023
21 checks passed
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 14, 2024
3.3.0 (2024-02-14)
==================

- Extended FlexiBLAS support to be able to switch backend at runtime.
  joblib/threadpoolctl#163

- Added support for FlexiBLAS
  joblib/threadpoolctl#156

- Fixed a bug where an unsupported library would be detected because it shares a common
  prefix with one of the supported libraries. Now the symbols are also checked to
  identify the supported libraries.
  joblib/threadpoolctl#151
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.

Incompatibility with unrelated C libraries whose names begin with certain prefixes (e.g. "libbliss.so")
2 participants