RuntimeError: No CUDA GPUs are available

Hi, I try to run the above code.

import os

import timeit

import pandas as pd

import numpy as np

#import cudf

import torch

import matplotlib.pyplot as plt

import warnings

warnings.filterwarnings(‘ignore’)

import gc

np.random.seed(0)

print(f"cuda.is_available: {torch.cuda.is_available()}")

#dev=torch.cuda.current_device()

devs = torch.cuda.device_count()

print(devs)

for dev in range(devs):

print(f"#dev {dev}: {torch.cuda.get_device_name(dev)}")

And receive this error

import os
import timeit
import pandas as pd
import numpy as np
#import cudf
import torch
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings(‘ignore’)
import gc

np.random.seed(0)

print(f"cuda.is_available: {torch.cuda.is_available()}")

#dev=torch.cuda.current_device()

devs = torch.cuda.device_count()
print(devs)
for dev in range(devs):
print(f"#dev {dev}: {torch.cuda.get_device_name(dev)}")

Anybody can help me?

No CUDA GPUs are available

What GPUs are installed in your system?

Tue Nov 5 18:14:40 2024
±----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.57.01 Driver Version: 565.57.01 CUDA Version: 12.7 |
|-----------------------------------------±-----------------------±---------------------+
| 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 H100 80GB HBM3 On | 00000000:0F:00.0 Off | 0 |
| N/A 31C P0 123W / 700W | 1MiB / 81559MiB | 0% Default |
| | | Disabled |
±----------------------------------------±-----------------------±---------------------+
| 1 NVIDIA H100 80GB HBM3 On | 00000000:2D:00.0 Off | 0 |
| N/A 38C P0 128W / 700W | 1MiB / 81559MiB | 0% Default |
| | | Disabled |
±----------------------------------------±-----------------------±---------------------+
| 2 NVIDIA H100 80GB HBM3 On | 00000000:44:00.0 Off | 0 |
| N/A 31C P0 117W / 700W | 1MiB / 81559MiB | 0% Default |
| | | Disabled |
±----------------------------------------±-----------------------±---------------------+
| 3 NVIDIA H100 80GB HBM3 On | 00000000:5B:00.0 Off | 0 |
| N/A 38C P0 128W / 700W | 1MiB / 81559MiB | 0% Default |
| | | Disabled |
±----------------------------------------±-----------------------±---------------------+
| 4 NVIDIA H100 80GB HBM3 On | 00000000:89:00.0 Off | 0 |
| N/A 31C P0 126W / 700W | 1MiB / 81559MiB | 0% Default |
| | | Disabled |
±----------------------------------------±-----------------------±---------------------+
| 5 NVIDIA H100 80GB HBM3 On | 00000000:A8:00.0 Off | 0 |
| N/A 37C P0 126W / 700W | 1MiB / 81559MiB | 0% Default |
| | | Disabled |
±----------------------------------------±-----------------------±---------------------+
| 6 NVIDIA H100 80GB HBM3 On | 00000000:C0:00.0 Off | 0 |
| N/A 37C P0 120W / 700W | 1MiB / 81559MiB | 0% Default |
| | | Disabled |
±----------------------------------------±-----------------------±---------------------+
| 7 NVIDIA H100 80GB HBM3 On | 00000000:D8:00.0 Off | 0 |
| N/A 31C P0 123W / 700W | 1MiB / 81559MiB | 0% Default |
| | | Disabled |
±----------------------------------------±-----------------------±---------------------+

±----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
±----------------------------------------------------------------------------------------+