Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ bitsandbytes has the following minimum requirements for all platforms:
<tr>
<td></td>
<td>⬜ Metal <br><code>mps</code></td>
<td>Apple M1+</td>
<td>🐢</td>
<td>🐢</td>
<td></td>
<td>Apple M1+<br><small>Install <a href="https://github.com/mpsops/mps-bitsandbytes">mps-bitsandbytes</a> for optimized Metal kernels</small></td>
<td></td>
<td></td>
<td></td>
</tbody>
</table>

Expand Down
7 changes: 7 additions & 0 deletions bitsandbytes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
if hasattr(torch, "hpu") and torch.hpu.is_available():
from .backends.hpu import ops as hpu_ops

# MPS backend (Apple Silicon) - requires mps-bitsandbytes for optimized Metal kernels
if hasattr(torch.backends, "mps") and torch.backends.mps.is_available():
try:
from .backends.mps import ops as mps_ops
except ImportError:
pass # mps-bitsandbytes not installed, will use default backend


def _import_backends():
"""
Expand Down
4 changes: 4 additions & 0 deletions bitsandbytes/backends/mps/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# MPS backend for bitsandbytes
# Provides optimized Metal kernels for Apple Silicon

from . import ops
Loading