def _lazy_init():
global _initialized, _cudart
if _initialized:
return
_check_driver()
assert torch._C._cuda_init()
_cudart = _load_cudart()
_cudart.cudaGetErrorName.restype = ctypes.c_char_p
_cudart.cudaGetErrorString.restype = ctypes.c_char_p
_initialized = True
评论列表
文章目录