Skip to content

Commit f511026

Browse files
authored
fix: Remove unused code
1 parent 9836b0b commit f511026

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

bitsandbytes/cuda_setup/main.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -275,17 +275,6 @@ def determine_cuda_runtime_lib_path() -> Union[Path, None]:
275275
return next(iter(cuda_runtime_libs)) if cuda_runtime_libs else None
276276

277277

278-
# def check_cuda_result(cuda, result_val):
279-
# # 3. Check for CUDA errors
280-
# if result_val != 0:
281-
# error_str = ct.c_char_p()
282-
# cuda.cuGetErrorString(result_val, ct.byref(error_str))
283-
# if error_str.value is not None:
284-
# CUDASetup.get_instance().add_log_entry(f"CUDA exception! Error code: {error_str.value.decode()}")
285-
# else:
286-
# CUDASetup.get_instance().add_log_entry(f"Unknown CUDA exception! Please check your CUDA install. It might also be that your GPU is too old.")
287-
288-
289278
# https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART____VERSION.html#group__CUDART____VERSION
290279
def get_cuda_version(cuda, cudart_path):
291280
if cuda is None: return None
@@ -307,15 +296,12 @@ def get_cuda_lib_handle():
307296
except OSError:
308297
CUDASetup.get_instance().add_log_entry('CUDA SETUP: WARNING! libcuda.so not found! Do you have a CUDA driver installed? If you are on a cluster, make sure you are on a CUDA machine!')
309298
return None
310-
# check_cuda_result(cuda, cuda.cuInit(0))
311299

312300
return cuda
313301

314302

315303
def get_compute_capabilities(cuda):
316304
ccs = []
317-
# for i in range(torch.cuda.device_count()):
318-
# device = torch.cuda.device(i)
319305
ccs.append(torch.version.cuda)
320306

321307
return ccs

0 commit comments

Comments
 (0)