[Issue]: torch.cuda.mem_get_info function RuntimeError(HIP error: invalid argument)
Los mantenedores suelen responder en 1 día
@yansun1996 ya está trabajando en esto.
Desde el 22/9/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Problem Description
I'm try to run sample code in container after install gpu-operator helm chart on my cluster(1.32.8 k8s version). my test code is below. How can I solve this problem? I'd appreciate it if you could let me know.
import torch
if torch.cuda.is_available():
free_memory_bytes, total_memory_bytes = torch.cuda.mem_get_info()
free_memory_gb = free_memory_bytes / (1024**3)
total_memory_gb = total_memory_bytes / (1024**3)
print(f"Free GPU memory: {free_memory_gb:.2f} GB")
print(f"Total GPU memory: {total_memory_gb:.2f} GB")
else:
print("CUDA is not available. Cannot get GPU memory info.")
and error message is:
Traceback (most recent call last):
File "/var/lib/jenkins/test.py", line 4, in <module>
free_memory_bytes, total_memory_bytes = torch.cuda.mem_get_info()
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/cuda/memory.py", line 738, in mem_get_info
return torch.cuda.cudart().cudaMemGetInfo(device)
RuntimeError: HIP error: invalid argument
HIP kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing AMD_SERIALIZE_KERNEL=3
Compile with `TORCH_USE_HIP_DSA` to enable device-side assertions.
my pod yaml information:
apiVersion: v1
kind: Pod
metadata:
name: rocm-pytorch-test
namespace: kube-amd-gpu
labels:
app: rocm-pytorch-test
spec:
restartPolicy: Never
tolerations:
- key: "amd.com/gpu"
operator: "Exists"
effect: "NoSchedule"
containers:
- name: rocm-pytorch
image: rocm/pytorch:rocm6.4.2_ubuntu22.04_py3.10_pytorch_release_2.6.0
imagePullPolicy: IfNotPresent
command: ["sleep", "infinity"]
resources:
limits:
"amd.com/gpu": 8
Here is my OS and GPU information
OS: NAME="Ubuntu"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
CPU:
model name : AMD EPYC 7413 24-Core Processor
GPU:
Name: AMD EPYC 7413 24-Core Processor
Marketing Name: AMD EPYC 7413 24-Core Processor
Name: AMD EPYC 7413 24-Core Processor
Marketing Name: AMD EPYC 7413 24-Core Processor
Name: gfx90a
Marketing Name: AMD Instinct MI250X/MI250
Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-
Name: gfx90a
Marketing Name: AMD Instinct MI250X/MI250
Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-
Name: gfx90a
Marketing Name: AMD Instinct MI250X/MI250
Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-
Name: gfx90a
Marketing Name: AMD Instinct MI250X/MI250
Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-
Name: gfx90a
Marketing Name: AMD Instinct MI250X/MI250
Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-
Name: gfx90a
Marketing Name: AMD Instinct MI250X/MI250
Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-
Name: gfx90a
Marketing Name: AMD Instinct MI250X/MI250
Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-
Name: gfx90a
Marketing Name: AMD Instinct MI250X/MI250
Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-
Operating System
Ubuntu 22.04
CPU
AMD EPYC 7413 24-Core Processor
GPU
AMD Instinct MI250X/MI250
ROCm Version
ROCm 6.4.2
ROCm Component
HIP
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response
- Lenguaje dominante
- Go
- Estrellas
- 110
- Forks
- 63
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ROCm/gpu-operator
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
ROCm/gpu-operator#688 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
ROCm/gpu-operator#679 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
ROCm/gpu-operator#638 ·
Los mantenedores suelen responder en 1 día
-
[Issue]: Cannot build image for Ubuntu 26.04Posiblemente ocupada @dhhoang la tomó hace 20 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
ROCm/gpu-operator#631 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Issue]: multiple critical and security CVEs found in the images released with 1.5.1Quizá libre de nuevo @yansun1996 la tomó hace 76 días y no hay ningún pull request abierto. Abierto
ROCm/gpu-operator#629 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de ROCm/gpu-operator
Issues similares
-
docs: database/sql Sessions example never commits its batch, and its "Full Example" link is a 404Abiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
ClickHouse/clickhouse-go#2185 ·
Los mantenedores suelen responder en 1 día
-
tagvalue.Read fails with "token too long" on lines over 64 KiBPosiblemente ocupada @G26karthik la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
spdx/tools-golang#319 ·
-
area: community priority: p1 size: s type: docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
romanitalian/paytriage#23 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100