[petsc-dev] Supporting OpenCL matrix assembly

Jed Brown jedbrown at mcs.anl.gov
Mon Sep 23 14:30:33 CDT 2013


We have some motivated users that would like a way to assemble matrices
on a device, without needing to store all the element matrices to global
memory or to transfer them to the CPU.  Given GPU execution models, this
means we need something that can be done on-the-spot in kernels.  So
what about a function that can be called by device threads?

PetscErrorCode MatOpenCLGetSetValuesSource(Mat, synchronization_mechanism, char **);

The user concatenates this type-specialized code into their source and
calls MatSetValues().  The users I'm talking to here synchronize by
coordinating threads using coloring of a sort.  The user still needs to
call MatAssemblyBegin/End from outside a kernel, though that function
may or may not need to invoke its own kernel.

Crazy?
-------------- 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/20130923/ad367234/attachment.sig>


More information about the petsc-dev mailing list