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

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bitsandbytes/cextension.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,15 @@ def get_native_library() -> BNBNativeLibrary:


try:
lib = get_native_library()
if hasattr(torch, "xpu") and torch.xpu.is_available():
if not ipex_xpu:
logger.warning(
"Detected Intel XPU without intel_extension_for_pytorch installed. Triton implementation will be used."
)
Comment on lines +303 to +305
Copy link
Member

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.

# create a mock with error messaging as fallback
lib = ErrorHandlerMockBNBNativeLibrary("XPU does not need library loading")
Copy link
Member

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.

else:
lib = get_native_library()
except Exception as e:
error_msg = str(e)
if not (ipex_cpu or ipex_xpu):
Expand Down