Ejemplo n.º 1
0
 def test_cudnn(self):
     preload_version = self._get_config()['cudnn']['version']
     major, minor, patchlevel = (int(x) for x in preload_version.split('.'))
     expected_version = major * 1000 + minor * 100 + patchlevel
     assert libcudnn.available
     assert libcudnn.get_build_version() == expected_version
     assert libcudnn.getVersion() == expected_version
Ejemplo n.º 2
0
    def test_cudnn(self):
        config = cupy._environment.get_preload_config()
        assert config is not None

        preload_version = config['cudnn']['version']
        major, minor, patchlevel = (int(x) for x in preload_version.split('.'))
        expected_version = major * 1000 + minor * 100 + patchlevel
        assert libcudnn.available
        assert libcudnn.get_build_version() == expected_version
        assert libcudnn.getVersion() == expected_version
Ejemplo n.º 3
0
    def __init__(self):
        self.cupy_version = cupy.__version__

        self.cuda_path = cupy.cuda.get_cuda_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 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:
            # There is no API in CUB to retrieve the current version
            # We show if its enabled or disabled
            self.cub_version = 'Enabled'

        if cutensor is not None:
            self.cutensor_version = cutensor.get_version()
Ejemplo n.º 4
0
    def __init__(self):
        self.cupy_version = cupy.__version__

        self.cuda_path = cupy.cuda.get_cuda_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()

        # TODO(leofang): detect CUB runtime version

        if cutensor is not None:
            self.cutensor_version = cutensor.get_version()
Ejemplo n.º 5
0
    def __init__(self):
        self.cupy_version = cupy.__version__

        self.cuda_path = cupy.cuda.get_cuda_path()
        self.cuda_build_version = cupy.cuda.driver.get_build_version()
        self.cuda_driver_version = cupy.cuda.runtime.driverGetVersion()
        self.cuda_runtime_version = cupy.cuda.runtime.runtimeGetVersion()

        if cudnn is not None:
            self.cudnn_build_version = cudnn.get_build_version()
            self.cudnn_version = cudnn.getVersion()

        if nccl is not None:
            self.nccl_build_version = nccl.get_version()
Ejemplo n.º 6
0
    def __init__(self):
        self.cupy_version = cupy.__version__

        self.cuda_path = cupy.cuda.get_cuda_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)

        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_version()