Skip to content

use importlib machinery to check for habana plugin#1910

Merged
matthewdouglas merged 3 commits into
bitsandbytes-foundation:mainfrom
scw:gaudi-import-fix
Apr 3, 2026
Merged

use importlib machinery to check for habana plugin#1910
matthewdouglas merged 3 commits into
bitsandbytes-foundation:mainfrom
scw:gaudi-import-fix

Conversation

@scw

@scw scw commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Not all environments have pip, and even fewer have grep (e.g. Windows platforms), and the shell command is relatively costly for larger environments. Instead, use the stdlib infrastructure with importlib to identify the version of habana-torch-plugin if it is installed.

Not all environments have pip, and even fewer have grep (e.g. Windows
platforms), and the shell command is relatively costly for
larger environments. Instead, use the stdlib infrastructure with
`importlib` to identify the version of `habana-torch-plugin` if it is
installed.
@matthewdouglas matthewdouglas added this to the v0.50.0 milestone Apr 3, 2026
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@matthewdouglas matthewdouglas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, except for one minor nit. Thanks!

Comment thread bitsandbytes/backends/utils.py Outdated
@matthewdouglas matthewdouglas merged commit 4986b43 into bitsandbytes-foundation:main Apr 3, 2026
91 checks passed
@scw

scw commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the quick turnaround on the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants