Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions cupyx/_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,46 +122,46 @@ def __init__(self, *, full=True):
cupy.cuda.runtime.CUDARuntimeError)
self.cuda_local_runtime_version = _eval_or_error(
cupy.cuda.get_local_runtime_version,
cupy.cuda.runtime.CUDARuntimeError)
Exception)

# cuBLAS
self.cublas_version = '(available)'
if full:
self.cublas_version = _eval_or_error(
lambda: cupy.cuda.cublas.getVersion(
cupy.cuda.device.get_cublas_handle()),
cupy.cuda.cublas.CUBLASError)
Exception)

# cuFFT
try:
from cupy.cuda import cufft
self.cufft_version = _eval_or_error(
cufft.getVersion, cufft.CuFFTError)
lambda: cufft.getVersion(), Exception)
except ImportError:
pass

# cuRAND
self.curand_version = _eval_or_error(
cupy.cuda.curand.getVersion,
cupy.cuda.curand.CURANDError)
lambda: cupy.cuda.curand.getVersion(),
Exception)

# cuSOLVER
self.cusolver_version = _eval_or_error(
cupy.cuda.cusolver._getVersion,
cupy.cuda.cusolver.CUSOLVERError)
lambda: cupy.cuda.cusolver._getVersion(),
Exception)

# cuSPARSE
self.cusparse_version = '(available)'
if full:
self.cusparse_version = _eval_or_error(
lambda: cupy.cuda.cusparse.getVersion(
cupy.cuda.device.get_cusparse_handle()),
cupy.cuda.cusparse.CuSparseError)
Exception)

# NVRTC
self.nvrtc_version = _eval_or_error(
cupy.cuda.nvrtc.getVersion,
(cupy.cuda.nvrtc.NVRTCError, cupy.cuda.runtime.CUDARuntimeError))
lambda: cupy.cuda.nvrtc.getVersion(),
Exception)

# Thrust
try:
Expand Down