MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / _get_kernel

Function _get_kernel

bitsandbytes/backends/mps/ops.py:36–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def _get_kernel():
37 global _kernel, _kernel_load_failed
38 if _kernel_load_failed:
39 return None
40 if _kernel is not None:
41 return _kernel
42 try:
43 from kernels import get_kernel
44
45 _kernel = get_kernel("kernels-community/bitsandbytes-mps", version=1)
46 except Exception:
47 _kernel_load_failed = True
48 return None
49 return _kernel
50
51
52@_try_torch_compile(dynamic=True)

Callers 3

_Function · 0.85
_dequantize_4bit_implFunction · 0.85
_gemv_4bit_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected