[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-05-16 21:34:59 +00:00
commit f0ec030fbc
2 changed files with 8 additions and 3 deletions

View file

@ -56,14 +56,17 @@ if sys.platform == "win32":
# before any import that pulls in bitsandbytes (mirrors worker.py logic).
if "BNB_ROCM_VERSION" not in os.environ:
import glob as _glob
_bnb_rocm_ver = None
try:
import importlib.util as _ilu
_bnb_spec = _ilu.find_spec("bitsandbytes")
if _bnb_spec and _bnb_spec.origin:
_pkg_dir = os.path.dirname(_bnb_spec.origin)
_dlls = _glob.glob(os.path.join(_pkg_dir, "libbitsandbytes_rocm*.dll"))
import re as _re_bnb
for _dll in sorted(_dlls):
_m = _re_bnb.search(r"libbitsandbytes_rocm(\d+)\.dll", _dll)
if _m: