fix: Remove unused code
This commit is contained in:
parent
9836b0b90f
commit
f5110265ff
|
@ -275,17 +275,6 @@ def determine_cuda_runtime_lib_path() -> Union[Path, None]:
|
||||||
return next(iter(cuda_runtime_libs)) if cuda_runtime_libs else None
|
return next(iter(cuda_runtime_libs)) if cuda_runtime_libs else None
|
||||||
|
|
||||||
|
|
||||||
# def check_cuda_result(cuda, result_val):
|
|
||||||
# # 3. Check for CUDA errors
|
|
||||||
# if result_val != 0:
|
|
||||||
# error_str = ct.c_char_p()
|
|
||||||
# cuda.cuGetErrorString(result_val, ct.byref(error_str))
|
|
||||||
# if error_str.value is not None:
|
|
||||||
# CUDASetup.get_instance().add_log_entry(f"CUDA exception! Error code: {error_str.value.decode()}")
|
|
||||||
# else:
|
|
||||||
# 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.")
|
|
||||||
|
|
||||||
|
|
||||||
# https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART____VERSION.html#group__CUDART____VERSION
|
# https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART____VERSION.html#group__CUDART____VERSION
|
||||||
def get_cuda_version(cuda, cudart_path):
|
def get_cuda_version(cuda, cudart_path):
|
||||||
if cuda is None: return None
|
if cuda is None: return None
|
||||||
|
@ -307,15 +296,12 @@ def get_cuda_lib_handle():
|
||||||
except OSError:
|
except OSError:
|
||||||
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!')
|
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!')
|
||||||
return None
|
return None
|
||||||
# check_cuda_result(cuda, cuda.cuInit(0))
|
|
||||||
|
|
||||||
return cuda
|
return cuda
|
||||||
|
|
||||||
|
|
||||||
def get_compute_capabilities(cuda):
|
def get_compute_capabilities(cuda):
|
||||||
ccs = []
|
ccs = []
|
||||||
# for i in range(torch.cuda.device_count()):
|
|
||||||
# device = torch.cuda.device(i)
|
|
||||||
ccs.append(torch.version.cuda)
|
ccs.append(torch.version.cuda)
|
||||||
|
|
||||||
return ccs
|
return ccs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user