MAGMA BLAS: when to use pinned malloc

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
wirawan0
Posts: 4
Joined: Sat Apr 11, 2015 11:42 am

MAGMA BLAS: when to use pinned malloc

Post by wirawan0 » Mon Apr 13, 2015 5:23 pm

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

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: MAGMA BLAS: when to use pinned malloc

Post by mgates3 » Tue Apr 14, 2015 12:43 am

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

wirawan0
Posts: 4
Joined: Sat Apr 11, 2015 11:42 am

Re: MAGMA BLAS: when to use pinned malloc

Post by wirawan0 » Tue Apr 14, 2015 2:19 pm

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

Post Reply