-
-
Notifications
You must be signed in to change notification settings - Fork 847
update bnb log #1661
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
update bnb log #1661
Changes from 1 commit
343bfd5
ccc645d
09ceea2
e8d9883
47539fa
3fbc499
f2e9d66
bc4a540
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -298,7 +298,16 @@ def get_native_library() -> BNBNativeLibrary: | |
|
|
||
|
|
||
| try: | ||
| lib = get_native_library() | ||
| if hasattr(torch, "xpu") and torch.xpu.is_available(): | ||
| if not (ipex_cpu or ipex_xpu): | ||
| logger.warning( | ||
| "Detected Intel XPU but no Intel Extension for PyTorch (IPEX) installed. " | ||
| "IPEX is recommended for Intel XPU support in bitsandbytes to get better performance. " | ||
| "Please check the installation doc to install `intel_extension_for_pytorch`. " | ||
| ) | ||
|
Comment on lines
+303
to
+305
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For most of our target audience I feel like this isn't going to be super informative. It's OK for now but eventually we might want to find a way to spell out exactly what it means for them, and whether we should be loud about it or not. |
||
| lib = ErrorHandlerMockBNBNativeLibrary("XPU does not need native library") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why need
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought it was the default lib, but we can just set lib=None since XPU will not use lib. |
||
| else: | ||
| lib = get_native_library() | ||
| except Exception as e: | ||
| error_msg = str(e) | ||
| if not (ipex_cpu or ipex_xpu): | ||
|
|
||
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.
Can we please mention Triton here?
For example: "XPU is detected, but IPEX is missing, will try to use Trtiton implementation. If performance is lower your expectations, consider installing IPEX"
The current wording effectively prohibits the use of XPU without IPEX.
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.
fixed