Page 1 of 1

MAGMA BLAS: when to use pinned malloc

Posted: Mon Apr 13, 2015 5:23 pm
by wirawan0
Hi,

I am quite new to MAGMA. I want to get clarification as to when pinned malloc (e.g. magma_dmalloc_pinned, magma_zmalloc_pinned, and friends) are to be used in place of vanilla magma_dmalloc, magma_zmalloc... My understanding is that the pinned host memory alloc is needed for the best speed transfer between CPU and GPU, but there is a drawback that the memory is not available for something else while allocated. Can someone clarify this? I can't find a documentation explaining this in MAGMA online documentation, or in testing source code. In that source code stuff, the only pinned malloc was with the BLAS testing stuff.

Wirawan

Re: MAGMA BLAS: when to use pinned malloc

Posted: Tue Apr 14, 2015 12:43 am
by mgates3
See response to
viewtopic.php?f=2&t=1194&p=3405#p3405

Note that magma_dmalloc allocates GPU memory, while magma_dmalloc_cpu and magma_dmalloc_pinned allocate host memory (regular and pinned).

Pinned memory cannot be swapped out of physical RAM, so it limits the OS. If you have lots of physical RAM, this is not usually a problem, but if your RAM is limited it may be an issue.

-mark

Re: MAGMA BLAS: when to use pinned malloc

Posted: Tue Apr 14, 2015 2:19 pm
by wirawan0
Thanks. Sorry this was a duplicate of another forum post (viewtopic.php?f=2&t=1194) because I did not realize my posting was being moderated, not lost. So any further discussion, please use that first thread.

Wirawan