Skip to content

Conversation

@MekkCyber
Copy link

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

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.

Comment on lines +1 to +10
"""Dispatcher shimming the editable layout.

When this repository is used via ``pip install -e .`` the real Python
package lives under ``bitsandbytes/bitsandbytes``. Importing from the
workspace root (e.g. running scripts from ``.../ai/kernels``) would
otherwise resolve to this outer directory, yielding a namespace module
with no attributes. Import the inner package eagerly and mirror its
symbols so ``import bitsandbytes`` always behaves the same as the
installed wheel.
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this; CI for tests currently breaks with this and I wouldn't normally expect anyone to run a script from the project root.

I've been thinking separately of switching to a src layout from the flat layout we have now, which would probably take care of things like this too, but probably out of scope here. I think we could just move test_bnb_mac.py into examples.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, of coursed, this is just a draft to get the discussion started on what we’ll need. I managed to get it working using a shim to pass the underlying MTL buffer to the kernel, but ran into another issue: I have to commit the work and wait manually, since I can’t synchronize with the PyTorch stream afterward. I’m also working on another PR to integrate libtorch and see if it gives us better performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants