From e4cf33f2a38e54ca2a523bc5d5923237c68b0112 Mon Sep 17 00:00:00 2001 From: Max Ryabinin Date: Fri, 1 Jul 2022 17:25:44 +0300 Subject: Fix imports --- bitsandbytes/__init__.py | 2 +- bitsandbytes/functional.py | 2 +- bitsandbytes/optim/__init__.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'bitsandbytes') diff --git a/bitsandbytes/__init__.py b/bitsandbytes/__init__.py index 22fb841..02ca804 100644 --- a/bitsandbytes/__init__.py +++ b/bitsandbytes/__init__.py @@ -4,7 +4,7 @@ # LICENSE file in the root directory of this source tree. from .nn import modules -from cextension import COMPILED_WITH_CUDA +from .cextension import COMPILED_WITH_CUDA if COMPILED_WITH_CUDA: from .optim import adam diff --git a/bitsandbytes/functional.py b/bitsandbytes/functional.py index 68b1d78..ab4e565 100644 --- a/bitsandbytes/functional.py +++ b/bitsandbytes/functional.py @@ -9,7 +9,7 @@ from typing import Tuple import torch from torch import Tensor -from cextension import lib, COMPILED_WITH_CUDA +from .cextension import lib, COMPILED_WITH_CUDA name2qmap = {} diff --git a/bitsandbytes/optim/__init__.py b/bitsandbytes/optim/__init__.py index e833ecc..42b5bc0 100644 --- a/bitsandbytes/optim/__init__.py +++ b/bitsandbytes/optim/__init__.py @@ -13,4 +13,5 @@ if COMPILED_WITH_CUDA: from .lamb import LAMB, LAMB8bit, LAMB32bit from .rmsprop import RMSprop, RMSprop8bit, RMSprop32bit from .adagrad import Adagrad, Adagrad8bit, Adagrad32bit - from .optimizer import GlobalOptimManager + +from .optimizer import GlobalOptimManager -- cgit v1.2.3