Skip to content

CUDA out of memory How to solve this problem? #24

@sxy971118

Description

@sxy971118

[rank0]: torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 158.00 MiB. GPU 0 has a total capacity of 23.69 GiB of which 115.69 MiB is free. Process 21422 has 23.57 GiB memory in use. Of the allocated memory 22.14 GiB is allocated by PyTorch, and 910.35 MiB 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)

Can you please tell me how to solve this problem?
Snipaste_2024-09-14_22-14-10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions