Stuck with cudf in WSL2 - Installed all dependencies but after loading it, its not working at all

185 Views Asked by At

Im using WSL2 and for some reason cudf.pandas is not using my gpu at all, in fact it stays at 0% usage with large datasets. I've installed rapids and cuda running the following codes succesfully:

%load_ext cudf.pandas
import pandas as pd
print(pd)

<module 'pandas' (ModuleAccelerator(fast=cudf, slow=pandas))>
import cudf
print(cudf.Series([1, 2, 3]))

0    1
1    2
2    3
dtype: int64

Also I this are my specs when runing nvidia-smi:

enter image description here

And the cuda toolkit nvcc --version:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

EDIT:

I installed nvtop as suggested an noticed the following error when runing the line %load_ext cudf.pandas: enter image description here

1

There are 1 best solutions below

3
TaureanDyerNV On

First, your screen shot shows 13% GPU Utilization. Congrats on capturing that, as it is sometimes hard to get a number other than 0. Unless you're crunching GBs, many operations complete before you hit enter on nvidia-smi. When no processing is happening than instant, your GPU utilization will be 0%. However, your memory utilization size will increase. It says you have 1196 MiB used out of 12288MiB, which says something has happened on the GPU.

A better way to check GPU utilization is historical graphing. As you are in WSL2, a great, built-in Windows tools that does this well is Task Manager's Performance tab. In Ubuntu, a great tool to use, if using CLI, is nvtop. It will graph historical usage. Finally, in docker, or jupyter hub, NVIDIA has NVDashboard integrations for jupyter.