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.
why need ErrorHandlerMockBNBNativeLibrary
There was a problem hiding this comment.
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.
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.
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
|
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 <jiqing.feng@intel.com>
|
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 <jiqing.feng@intel.com>
| "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.
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.
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!