Problem definition
I have been trying to use my mobile Quadro T1000 with cuda in pytorch, but pytorch use CPU whatever I do. I installed pytorch, GPU drivers and CUDA Toolkit.
If I run command I get nothing
lspci | grep -i nvidia
Pytorch info:
torch.__version__: 1.13.0+cu117
torch.version.cuda: 11.7
torch.cuda.current_device(): 0
torch.cuda.is_available(): True
Windows 10 Pro 21H2
Extra info:
lspci
3a66:00:00.0 3D controller: Microsoft Corporation Basic Render Driver
4498:00:00.0 3D controller: Microsoft Corporation Basic Render Driver
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
nvidia-smi
https://i.stack.imgur.com/4p5UE.png
dpkg -l | grep linux-modules-nvidia
- nothing
dpkg -l | grep nvidia-driver
- nothing
uname -a
Linux CPR-5CD111 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
inxi -G
Graphics:
Device-1: Microsoft Basic Render Driver driver: dxgkrnl v: N/A
Device-2: Microsoft Basic Render Driver driver: dxgkrnl v: N/A
Display: server: No display server data found. Headless machine? tty: 145x14
Message: GL data unavailable in console. Try -G --display
grep 10de /lib/udev/rules.d/*
- nothing
dmesg | grep nvidia
- nothing
dmesg | grep NV
- nothing
def train(res_model, criterion, optimizer, train_dataloader, test_dataloader, NUM_EPOCH=15):
for epoch in tqdm(range(NUM_EPOCH)):
model.train()
train_loss = 0.
train_size = 0
train_pred = 0.
for imgs, labels in train_dataloader:
optimizer.zero_grad()
imgs = imgs.cuda()
labels = labels.cuda()
y_pred = model(imgs)
loss = criterion(y_pred, labels)
loss.backward()
train_loss += loss.item()
train_size += y_pred.size(0)
train_loss_log.append(loss.data / y_pred.size(0))
train_pred += (y_pred.argmax(1) == labels).sum()
optimizer.step()