def __init__(self): self.cupy_version = cupy.__version__ if not is_hip: self.cuda_path = cupy.cuda.get_cuda_path() else: self.cuda_path = cupy._environment.get_rocm_path() self.cuda_build_version = cupy.cuda.driver.get_build_version() self.cuda_driver_version = _eval_or_error( cupy.cuda.runtime.driverGetVersion, cupy.cuda.runtime.CUDARuntimeError) self.cuda_runtime_version = _eval_or_error( cupy.cuda.runtime.runtimeGetVersion, cupy.cuda.runtime.CUDARuntimeError) self.cublas_version = _eval_or_error( lambda: cupy.cuda.cublas.getVersion(cupy.cuda.device. get_cublas_handle()), cupy.cuda.cublas.CUBLASError) self.cufft_version = _eval_or_error(cupy.cuda.cufft.getVersion, cupy.cuda.cufft.CuFFTError) self.curand_version = _eval_or_error(cupy.cuda.curand.getVersion, cupy.cuda.curand.CURANDError) self.cusolver_version = _eval_or_error( cupy.cuda.cusolver._getVersion, cupy.cuda.cusolver.CUSOLVERError) self.cusparse_version = _eval_or_error( lambda: cupy.cuda.cusparse.getVersion(cupy.cuda.device. get_cusparse_handle()), cupy.cuda.cusparse.CuSparseError) self.nvrtc_version = _eval_or_error(cupy.cuda.nvrtc.getVersion, cupy.cuda.nvrtc.NVRTCError) if thrust is not None: self.thrust_version = thrust.get_build_version() if cudnn is not None: self.cudnn_build_version = cudnn.get_build_version() self.cudnn_version = _eval_or_error(cudnn.getVersion, cudnn.CuDNNError) if nccl is not None: self.nccl_build_version = nccl.get_build_version() nccl_runtime_version = nccl.get_version() if nccl_runtime_version == 0: nccl_runtime_version = '(unknown)' self.nccl_runtime_version = nccl_runtime_version if cub is not None: self.cub_build_version = cub.get_build_version() if cutensor is not None: self.cutensor_version = cutensor.get_version() self.numpy_version = numpy.version.full_version if scipy is not None: self.scipy_version = scipy.version.full_version
def __init__(self, *, full=True): self.cupy_version = cupy.__version__ if not is_hip: self.cuda_path = cupy.cuda.get_cuda_path() else: self.cuda_path = cupy._environment.get_rocm_path() if not is_hip: self.nvcc_path = cupy._environment.get_nvcc_path() else: self.nvcc_path = cupy._environment.get_hipcc_path() driver_build_version = cupy.cuda.driver.get_build_version() if cupy.cuda.driver._is_cuda_python(): import cuda self.cuda_build_version = (f'{driver_build_version} ' f'(CUDA Python: {cuda.__version__})') else: self.cuda_build_version = driver_build_version self.cuda_driver_version = _eval_or_error( cupy.cuda.runtime.driverGetVersion, cupy.cuda.runtime.CUDARuntimeError) self.cuda_runtime_version = _eval_or_error( cupy.cuda.runtime.runtimeGetVersion, cupy.cuda.runtime.CUDARuntimeError) if full: self.cublas_version = _eval_or_error( lambda: cupy.cuda.cublas.getVersion(cupy.cuda.device. get_cublas_handle()), cupy.cuda.cublas.CUBLASError) else: self.cublas_version = '(available)' self.cufft_version = _eval_or_error(cupy.cuda.cufft.getVersion, cupy.cuda.cufft.CuFFTError) self.curand_version = _eval_or_error(cupy.cuda.curand.getVersion, cupy.cuda.curand.CURANDError) self.cusolver_version = _eval_or_error( cupy.cuda.cusolver._getVersion, cupy.cuda.cusolver.CUSOLVERError) if full: self.cusparse_version = _eval_or_error( lambda: cupy.cuda.cusparse.getVersion(cupy.cuda.device. get_cusparse_handle()), cupy.cuda.cusparse.CuSparseError) else: self.cusparse_version = '(available)' self.nvrtc_version = _eval_or_error(cupy.cuda.nvrtc.getVersion, cupy.cuda.nvrtc.NVRTCError) if thrust is not None: self.thrust_version = thrust.get_build_version() if cudnn is not None: self.cudnn_build_version = cudnn.get_build_version() self.cudnn_version = _eval_or_error(cudnn.getVersion, cudnn.CuDNNError) if nccl is not None: self.nccl_build_version = nccl.get_build_version() nccl_runtime_version = nccl.get_version() if nccl_runtime_version == 0: nccl_runtime_version = '(unknown)' self.nccl_runtime_version = nccl_runtime_version if cub is not None: self.cub_build_version = cub.get_build_version() if jitify is not None: self.jitify_build_version = jitify.get_build_version() if cutensor is not None: self.cutensor_version = cutensor.get_version() if cusparselt is not None: self.cusparselt_version = cusparselt.get_build_version() self.cython_build_version = cupy._util.cython_build_ver if Cython is not None: self.cython_version = Cython.__version__ self.numpy_version = numpy.version.full_version if scipy is not None: self.scipy_version = scipy.version.full_version