Hi,
I am a newbie with GPU & MAGMA programming. I see that MAGMA (and Cuda) provide pinned host memory allocation (magma_*alloc_pinned & cudaMallocHost). When do I need to use pinned malloc instead of regular malloc? I cannot see any indication in the MAGMA documentation or a pattern I could recognize in the testing directory. My understanding is that pinned malloc allows for the best memory transfer speed between GPU and CPU. Is this correct?
Wirawan
GPU MAGMA: When to use pinned memory allocation
Re: GPU MAGMA: When to use pinned memory allocation
Yes, pinned memory allows for overlapping CPU work with data transfers, which makes the algorithms faster.
Generally, the testers allocate pinned memory for calling MAGMA functions, while memory that is used only for LAPACK functions doesn't need to be pinned. However, allocating pinned memory can be somewhat expensive, especially for large allocations, so you may want to test with and without pinning to see the performance difference.
-mark
Generally, the testers allocate pinned memory for calling MAGMA functions, while memory that is used only for LAPACK functions doesn't need to be pinned. However, allocating pinned memory can be somewhat expensive, especially for large allocations, so you may want to test with and without pinning to see the performance difference.
-mark