-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[tests] Fix bnb cpu error #3351
base: main
Are you sure you want to change the base?
Conversation
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. |
if ( | ||
("cpu" in model_devices and not is_bitsandbytes_multi_backend_available()) | ||
or ("cpu" in model_devices and is_xpu_available()) | ||
or "disk" in model_devices | ||
): |
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.
does this mean that with xpu, it doesn't work if the model in on cpu even if bnb multi-backend is installed ?
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.
yes, cpu and xpu share the same bnb installation method, namely the multi-backend support.
What does this PR do?
Follow up on PR #3350.
The reason for the failure is that
is_bitsandbytes_multi_backend_available()
returns True on XPU, but False on CUDA. And this is because CUDA and XPU have different ways to install bitsandbytes (see here).To align the behavior on CUDA and XPU, we need to add an XPU check, thus this PR.
cc @muellerzr @SunMarc