For detailed information on step 1 ~ step 4, please refer to?CUDA on WSL :: CUDA Toolkit Documentation (nvidia.com)https://docs.nvidia.com/cuda/wsl-user-guide/
- Upgrade to Windows11
- install cuda on WSL2(in my case, I am using Ubuntu 20.04 and cuda 11.4)
- install Nividia preview drivers on windows11
- install anaconda on WSL2
- create env in anaconda(in my case, I am using python=3.8.11)
- follow "build from source" steps on?pytorch/pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration (github.com)https://github.com/pytorch/pytorch
- ?test if pytorch in WSL2 is using GPU acceleration
import torch
print(torch.cuda.is_available())
print(torch.cuda.current_device())
print(torch.cuda.device_count())
print(torch.cuda.get_device_name(0))
this should render an output similar to mine
True
0
1
NVIDIA GeForce RTX 2080 Ti
|