蟒蛇加速 check_cuda()
Anaconda Accelerate check_cuda()
检查cuda的正确anaconda加速函数是什么?
对于 numba-pro 你可以使用:
>>> from numbapro import check_cuda
numbapro:1: ImportWarning: The numbapro package is deprecated in favour of the accelerate package. Please update your code to use equivalent functions from accelerate.
>>> check_cuda()
CUDA is not available...
或
>>> numbapro.check_cuda()
------------------------------libraries detection-------------------------------
Finding cublas
located at /home/usr/miniconda3/envs/cuda/lib/libcublas.so.7.0.28
trying to open library... ok
Finding cusparse
located at /home/usr/miniconda3/envs/cuda/lib/libcusparse.so.7.0.28
trying to open library... ok
Finding cufft
located at /home/usr/miniconda3/envs/cuda/lib/libcufft.so.7.0.35
trying to open library... ok
Finding curand
located at /home/usr/miniconda3/envs/cuda/lib/libcurand.so.7.0.28
trying to open library... ok
Finding nvvm
located at /home/usr/miniconda3/envs/cuda/lib/libnvvm.so.3.0.0
trying to open library... ok
finding libdevice for compute_20... ok
finding libdevice for compute_30... ok
finding libdevice for compute_35... ok
-------------------------------hardware detection-------------------------------
Found 2 CUDA devices
id 0 b'GeForce GTX TITAN X' [SUPPORTED]
compute capability: 5.2
pci device id: 0
pci bus id: 1
id 1 b'GeForce GTX TITAN X' [SUPPORTED]
compute capability: 5.2
pci device id: 0
pci bus id: 4
Summary:
2/2 devices are supported
PASSED
True
numbapro 现在给出弃用警告,我无法在 anaconda 加速模块下找到等效的 check_conda()
方法。
我没有看到直接模拟,但底层例程似乎仍然存在,现在在 numba 中:
第一部分来自 numba.cuda.cudadrv.libs.test()
,它生成对 CUDA 库的搜索。第二个是搜索设备的 numba.cuda.api.detect()
。 (在适当的加速中,您可以尝试不太详细的 accelerate.cuda.cuda_compatible()
,只是 returns true 或 false)
例如,
import numba.cuda.api,numba.cuda.cudadrv.libs
numba.cuda.cudadrv.libs.test()
numba.cuda.api.detect()
Finding cublas
located at S:\programs\x64\Anaconda3\DLLs\cublas64_75.dll
trying to open library... ok
Finding cusparse
located at S:\programs\x64\Anaconda3\DLLs\cusparse64_75.dll
trying to open library... ok
Finding cufft
located at S:\programs\x64\Anaconda3\DLLs\cufft64_75.dll
trying to open library... ok
Finding curand
located at S:\programs\x64\Anaconda3\DLLs\curand64_75.dll
trying to open library... ok
Finding nvvm
located at S:\programs\x64\Anaconda3\DLLs\nvvm64_30_0.dll
trying to open library... ok
finding libdevice for compute_20... ok
finding libdevice for compute_30... ok
finding libdevice for compute_35... ok
Found 1 CUDA devices
id 0 b'GeForce GTX 960' [SUPPORTED]
compute capability: 5.2
pci device id: 0
pci bus id: 4
Summary:
1/1 devices are supported
True
检查cuda的正确anaconda加速函数是什么?
对于 numba-pro 你可以使用:
>>> from numbapro import check_cuda
numbapro:1: ImportWarning: The numbapro package is deprecated in favour of the accelerate package. Please update your code to use equivalent functions from accelerate.
>>> check_cuda()
CUDA is not available...
或
>>> numbapro.check_cuda()
------------------------------libraries detection-------------------------------
Finding cublas
located at /home/usr/miniconda3/envs/cuda/lib/libcublas.so.7.0.28
trying to open library... ok
Finding cusparse
located at /home/usr/miniconda3/envs/cuda/lib/libcusparse.so.7.0.28
trying to open library... ok
Finding cufft
located at /home/usr/miniconda3/envs/cuda/lib/libcufft.so.7.0.35
trying to open library... ok
Finding curand
located at /home/usr/miniconda3/envs/cuda/lib/libcurand.so.7.0.28
trying to open library... ok
Finding nvvm
located at /home/usr/miniconda3/envs/cuda/lib/libnvvm.so.3.0.0
trying to open library... ok
finding libdevice for compute_20... ok
finding libdevice for compute_30... ok
finding libdevice for compute_35... ok
-------------------------------hardware detection-------------------------------
Found 2 CUDA devices
id 0 b'GeForce GTX TITAN X' [SUPPORTED]
compute capability: 5.2
pci device id: 0
pci bus id: 1
id 1 b'GeForce GTX TITAN X' [SUPPORTED]
compute capability: 5.2
pci device id: 0
pci bus id: 4
Summary:
2/2 devices are supported
PASSED
True
numbapro 现在给出弃用警告,我无法在 anaconda 加速模块下找到等效的 check_conda()
方法。
我没有看到直接模拟,但底层例程似乎仍然存在,现在在 numba 中:
第一部分来自 numba.cuda.cudadrv.libs.test()
,它生成对 CUDA 库的搜索。第二个是搜索设备的 numba.cuda.api.detect()
。 (在适当的加速中,您可以尝试不太详细的 accelerate.cuda.cuda_compatible()
,只是 returns true 或 false)
例如,
import numba.cuda.api,numba.cuda.cudadrv.libs
numba.cuda.cudadrv.libs.test()
numba.cuda.api.detect()
Finding cublas
located at S:\programs\x64\Anaconda3\DLLs\cublas64_75.dll
trying to open library... ok
Finding cusparse
located at S:\programs\x64\Anaconda3\DLLs\cusparse64_75.dll
trying to open library... ok
Finding cufft
located at S:\programs\x64\Anaconda3\DLLs\cufft64_75.dll
trying to open library... ok
Finding curand
located at S:\programs\x64\Anaconda3\DLLs\curand64_75.dll
trying to open library... ok
Finding nvvm
located at S:\programs\x64\Anaconda3\DLLs\nvvm64_30_0.dll
trying to open library... ok
finding libdevice for compute_20... ok
finding libdevice for compute_30... ok
finding libdevice for compute_35... ok
Found 1 CUDA devices
id 0 b'GeForce GTX 960' [SUPPORTED]
compute capability: 5.2
pci device id: 0
pci bus id: 4
Summary:
1/1 devices are supported
True