question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GPU available but not used

See original GitHub issue

Executing CFLOW model on Colab, PyTorch returns this

GPU available: True, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs

GPU available but not used. Set "accelerator" and "devices" using Trainer(accelerator='gpu', devices=1).

Even if i’m setting gpus=1 on the config.yml of cflow.

To Reproduce train.py --model cflow

GPU Model GPU 0: Tesla T4

Versions

pytorch-lightning             1.6.1
torch                         1.10.0+cu111
torchaudio                    0.10.0+cu111
torchmetrics                  0.7.3
torchsummary                  1.5.1
torchtext                     0.11.0
torchvision                   0.11.1+cu111

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andriy-onufriyenkocommented, Apr 15, 2022

I solved rolling back at version of pytorch-lightning==1.5.9

I found the problem. PyTorch Lightning deprecated and / or modified some of the Trainer configs after v1.6.0, which is the reason for not using the GPU despite being available.

The issue has been fixed in PR #234

@samet-akcay

I checked it works for me:

GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs

Just replace all 11 files from PR 234 in to my project.

0reactions
samet-akcaycommented, Apr 14, 2022

I solved rolling back at version of pytorch-lightning==1.5.9

I found the problem. PyTorch Lightning deprecated and / or modified some of the Trainer configs after v1.6.0, which is the reason for not using the GPU despite being available.

The issue has been fixed in PR #234

Read more comments on GitHub >

github_iconTop Results From Across the Web

GPU available but not used - Stack Overflow
is_built_with_cuda()) on a Python terminal from Conda it says True for both of them. Same if I check it while running on VS...
Read more >
[tune] pytorch-lightning not using gpu · Issue #13311 - GitHub
Hmm based off the (pid=1109) GPU available: True, used: True line, Pytorch Lightning is showing that GPU is being used. When you no...
Read more >
Is a GPU available? - GitHub Pages
The first thing you need to know when you're thinking of using a GPU is whether there is actually one available. There are...
Read more >
Solution to TensorFlow 2 not using GPU | by Shakti Wadekar
This article addresses the reason and debugging/solution process to solve the issue of tensorflow 2 (tf2) not using GPU.
Read more >
Help why torch.cuda.is_available return True but my GPU didn ...
The error message is raised, if you are using a build, which doesn't support your GPU architecture, so which GPU are you using?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found