Skip to content

Commit

Permalink
allow features flags on bnb
Browse files Browse the repository at this point in the history
  • Loading branch information
Titus-von-Koeller committed Jul 30, 2024
1 parent c8b4b33 commit d385aea
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bitsandbytes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
from .cextension import lib
from .nn import modules

# NOTE: this is a temporary flag to allow outside libraries to employ conditional logic while the refactor is still in
# alpha/beta: sth like `if getattr(bitsandbytes, "is_multi_backend_refactor_preview", False): do sth`
# the getattr() call above would default to False and any string evaluates to True. This way we have temporary thing
# that we can remove in Transformers with the next release after the official BNB multi-platform release; then
# eventually making it the new default (e.g. just remove if statement and dedent in Transformers)
is_multi_backend_refactor_preview = "TO BE REMOVED ONCE MERGED TO `main`" # bool evals to True for str
features = {"multi_backend"}

# Always register the CPU backend.
register_backend("cpu", CPUBackend())
Expand Down

0 comments on commit d385aea

Please sign in to comment.