Skip to content

Commit

Permalink
Hardcode windows
Browse files Browse the repository at this point in the history
  • Loading branch information
niclimcy committed Mar 18, 2023
1 parent 2c8352e commit 9eeb525
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions bitsandbytes/cuda_setup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ def run_cuda_setup(self):
self.generate_instructions()
self.print_log_stack()
raise Exception('CUDA SETUP: Setup Failed!')
self.lib = ct.cdll.LoadLibrary(binary_path)
self.lib = ct.cdll.LoadLibrary(str(binary_path))
else:
self.add_log_entry(f"CUDA SETUP: Loading binary {binary_path}...")
self.lib = ct.cdll.LoadLibrary(binary_path)
self.lib = ct.cdll.LoadLibrary(str(binary_path))
except Exception as ex:
self.add_log_entry(str(ex))
self.print_log_stack()
Expand Down Expand Up @@ -360,12 +360,16 @@ def get_compute_capability(cuda):


def evaluate_cuda_setup():
binary_name = 'libbitsandbytes_cuda116.dll'
# cudart_path = 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.1\\bin'
# cuda_version_string = f'{12}{2}'
return binary_name, None, None, None, None
if 'BITSANDBYTES_NOWELCOME' not in os.environ or str(os.environ['BITSANDBYTES_NOWELCOME']) == '0':
print('')
print('='*35 + 'BUG REPORT' + '='*35)
print('Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues')
print('='*80)
if not torch.cuda.is_available(): return 'libsbitsandbytes_cpu.so', None, None, None, None
if torch.cuda.is_available(): return 'libbitsandbytes_cuda116.dll', None, None, None, None

cuda_setup = CUDASetup.get_instance()
cudart_path = determine_cuda_runtime_lib_path()
Expand Down
Binary file added bitsandbytes/libbitsandbytes_cuda116.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from setuptools import find_packages, setup

libs = list(glob.glob("./bitsandbytes/libbitsandbytes*.so"))
libs = list(glob.glob("./bitsandbytes/libbitsandbytes*.dll"))
libs = [os.path.basename(p) for p in libs]
print("libs:", libs)

Expand Down

0 comments on commit 9eeb525

Please sign in to comment.