I have a problem Anaconda and GPU accelerating on WSL2 Ubuntu 22.04 with RapidsAI libs. Conda create GPU envirovment:
conda create -n rapids-22.10 -c rapidsai -c conda-forge -c nvidia \
rapids=22.10 python=3.9 cudatoolkit=11.2 \
tensorflow
I have installed Cuda by CUDA on WSL :: CUDA Toolkit Documentation then I have tested it. My workstation with installed Windows GPU drivers includes Nvidia GeForce RTX 3060.
nvidia-smi is Ok.
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.46 Driver Version: 526.86 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... On | 00000000:03:00.0 Off | N/A |
| 0% 38C P8 9W / 170W | 878MiB / 12288MiB | 1% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 26 G /Xwayland N/A |
+-----------------------------------------------------------------------------+
But /dev not includes GPU, I am trying “ls /dev | grep nvidia*” and it is haven’t results Then I started Cuda samples ./deviceQuery and it successful.
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "NVIDIA GeForce RTX 3060"
CUDA Driver Version / Runtime Version 12.0 / 11.8
CUDA Capability Major/Minor version number: 8.6
Total amount of global memory: 12287 MBytes (12884246528 bytes)
(028) Multiprocessors, (128) CUDA Cores/MP: 3584 CUDA Cores
GPU Max Clock rate: 1852 MHz (1.85 GHz)
Memory Clock rate: 7501 Mhz
Memory Bus Width: 192-bit
L2 Cache Size: 2359296 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total shared memory per multiprocessor: 102400 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 1536
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 5 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device supports Managed Memory: Yes
Device supports Compute Preemption: Yes
Supports Cooperative Kernel Launch: Yes
Supports MultiDevice Co-op Kernel Launch: No
Device PCI Domain ID / Bus ID / location ID: 0 / 3 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 12.0, CUDA Runtime Version = 11.8, NumDevs = 1
Result = PASS
My code python:
import os
import cudf
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
df = cudf.Series([1,2,3])
print(df)
Code executed with error:
numba.cuda.cudadrv.runtime.CudaRuntimeAPIError: [100] Call to cudaRuntimeGetVersion results in CUDA_ERROR_NO_DEVICE
How I can configure my Conda envirowment to using GPU?