Is it possible to solve CUDA memory fragmentation issue?
Asked Answered
E

1

6

I'm trying to allocate some memory but sometimes get error "out of memory". cudaMemGetInfo says that available more memory that I need. So, problem in memory fragmentation. Is it possible to fix this problem? Is it possible to place elements in memory not one by one and fragment to few peaces that I can place in memory?

Ealdorman answered 12/10, 2012 at 20:28 Comment(0)
L
3

If you get "out of memory" because of memory fragmentation, then there is some error in the way that you work with memory!! You are responsible for fragmenting that memory, consider a redesign of your program and for example use a pool of memory to avoid too much new/delete to avoid fragmenting memory

Lacrimatory answered 12/10, 2012 at 21:23 Comment(3)
Is exist library that implements memory pool to CUDA?Ealdorman
Sorry for late answer, take a look at libhoard. I don't remember the site but googling libhoard will help you.Lacrimatory
I found this library but I found nothing about using it for CUDA device memory allocation.Ealdorman

© 2022 - 2024 — McMap. All rights reserved.