[petsc-dev] preallocation on GPU

Jed Brown jed at jedbrown.org
Sun Jun 1 05:42:32 CDT 2014


mary sweat <mary.sweat78 at yahoo.it> writes:

> So on the GPU I should use  MatSeqAIJSetPreallocation and MatMPIAIJSetPreallocation, just like on the CPU.
> Reading you answer I have a doubt: using preallocation on GPU is he speedup high?

I don't know what you're asking, but it's definitely a waste of time to
try to run something on a GPU before understanding which algorithms are
effective on the CPU.  GPUs offer a possibility for modest improvements
in throughput (not latency), but the algorithm needs to be well-suited
to the architecture.  CPUs are much more versatile, and choosing the
right algorithm can provide order-of-magnitude or better improvement.
Understand the algorithmic performance for your problem first, then
discuss whether a GPU has anything to offer.  (Very often the answer is
"no".)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140601/c7faa632/attachment.sig>


More information about the petsc-dev mailing list