-
Notifications
You must be signed in to change notification settings - Fork 704
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
Conversation
bitsandbytes/cextension.py
Outdated
"IPEX is recommended for Intel XPU support in bitsandbytes to get better performance. " | ||
"Please check the installation doc to install `intel_extension_for_pytorch`. " | ||
) | ||
lib = ErrorHandlerMockBNBNativeLibrary("XPU does not need native library") |
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.
why need ErrorHandlerMockBNBNativeLibrary
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.
I thought it was the default lib, but we can just set lib=None since XPU will not use lib.
bitsandbytes/cextension.py
Outdated
if not 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. " |
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
Signed-off-by: jiqing-feng <[email protected]>
Signed-off-by: jiqing-feng <[email protected]>
Signed-off-by: jiqing-feng <[email protected]>
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. |
We need to use mock lib because of the functional variable. |
Signed-off-by: jiqing-feng <[email protected]>
Hi @matthewdouglas . This PR is ready to be reviewed, please let me know your comments. Thanks! |
I don't think we should push user into a specific XPU backend, until we clearly know which one is likely faster. |
You were right, I have changed the log. This PR will avoid xpu through load native library error, as we don't want to load native lib on XPU. Please review my new changes. Without this PR, the error be like:
|
Signed-off-by: jiqing-feng <[email protected]>
"Detected Intel XPU without intel_extension_for_pytorch installed. Triton implementation will be used." | ||
) | ||
# create a mock with error messaging as fallback | ||
lib = ErrorHandlerMockBNBNativeLibrary("XPU does not need library loading") |
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.
Wouldn't we still want it in case the user has a reason to use the two CPU ops it implements? We don't necessarily know they won't just because an XPU is available.
logger.warning( | ||
"Detected Intel XPU without intel_extension_for_pytorch installed. Triton implementation will be used." | ||
) |
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.
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.
Close this PR as we may change the XPU behavior in the future. |
Update the error message when xpu is available, we don't need native library on XPU
@matthewdouglas Please review it. Thanks!