We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b3d609 commit fbb911bCopy full SHA for fbb911b
bitsandbytes/functional.py
@@ -2217,10 +2217,15 @@ def _convert_weight_packed_for_cpu_inverse(
2217
2218
2219
def has_avx512bf16():
2220
- if hasattr(lib, "has_avx512bf16_cpu") and lib.has_avx512bf16_cpu():
2221
- return True
2222
- else:
2223
- return False
+ """
+ Try calling native lib.has_avx512bf16_cpu().
+ Return False explicitly if symbol missing or call fails.
2224
+ try:
2225
+ support_avx_bf16 = lib.has_avx512bf16_cpu()
2226
+ except (AttributeError, RuntimeError, OSError):
2227
+ support_avx_bf16 = False
2228
+ return support_avx_bf16
2229
2230
2231
C = 127.0
0 commit comments