running through CUDA OutOfMemory error

Abierto
#1,058 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
8/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
pytorch

Línea de trabajo

The report is a CUDA out-of-memory traceback from a PyTorch training run, with no code, script or failing test named. There is no clear entry point in this repository to start from. The issue has gone 884 days with no comments and no reproduction, so a newcomer would first have to ask for the failing script and model configuration before any change could be made.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I'm always getting cuda OutOfMemory error :

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 7.50 GiB. GPU 0 has a total capacity of 21.99 GiB of which 6.62 GiB is free. Including non-PyTorch memory, this process has 15.35 GiB memory in use. Of the allocated memory 6.15 GiB is allocated by PyTorch, and 8.71 GiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (
https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

I already reduced batch size and I placed torch.cuda.empty_cache() everywhere in my script, but still not enough...

### I'm using :

pip list | grep cuda

nvidia-cuda-cupti-cu11 11.8.87
nvidia-cuda-nvrtc-cu11 11.8.89
nvidia-cuda-runtime-cu11 11.8.89

nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0

pip list | grep torch

pytorch-lightning 2.1.2
pytorch-triton 3.0.0+989adb9a29
torch 2.2.1+cu118
torchaudio 2.2.1+cu118
torchmetrics 1.3.2
torchvision 0.17.1+cu118

Lenguaje dominante
Jupyter Notebook
Estrellas
5.3k
Forks
1.7k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tensorflow/tpu

Todos los issues de tensorflow/tpu

Issues similares

Más issues de Machine Learning

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.