Skip to content

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

jiqing-feng
Copy link
Contributor

@jiqing-feng jiqing-feng commented May 29, 2025

Update the error message when xpu is available, we don't need native library on XPU
@matthewdouglas Please review it. Thanks!

"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")

Choose a reason for hiding this comment

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

why need ErrorHandlerMockBNBNativeLibrary

Copy link
Contributor Author

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.

@jiqing-feng jiqing-feng marked this pull request as ready for review May 29, 2025 05:33
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. "
Copy link

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.

Copy link
Contributor Author

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 <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
@matthewdouglas matthewdouglas added this to the v0.47.0 milestone Jun 2, 2025
@matthewdouglas matthewdouglas self-requested a review June 2, 2025 19:29
@matthewdouglas matthewdouglas added the Low Risk Risk of bugs in transformers and other libraries label Jun 2, 2025
Copy link

github-actions bot commented Jun 2, 2025

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.

@jiqing-feng jiqing-feng marked this pull request as draft June 3, 2025 05:13
@jiqing-feng jiqing-feng marked this pull request as ready for review June 3, 2025 05:49
@jiqing-feng
Copy link
Contributor Author

jiqing-feng commented Jun 3, 2025

We need to use mock lib because of the functional variable.

Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
@jiqing-feng
Copy link
Contributor Author

Hi @matthewdouglas . This PR is ready to be reviewed, please let me know your comments. Thanks!

@Egor-Krivov
Copy link
Contributor

I don't think we should push user into a specific XPU backend, until we clearly know which one is likely faster.
I just run simple inference benchmark and couldn't get performance improvements from IPEX: #1629 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Intel Integration Low Risk Risk of bugs in transformers and other libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants