[petsc-dev] Current status: GPUs for PETSc
Karl Rupp
rupp at mcs.anl.gov
Mon Nov 5 08:56:48 CST 2012
Hi Matt,
> I guess effectively we'd like something like
> MatCreateSeqAIJWithArrays and
> MatCreateMPIAIJWithSplitArrays but with the ability to pass
> device pointers
> rather than host pointers. Is there any roadmap in PETSc for
> this kind of
> thing? Would patches in this direction be welcome?
>
>
> Type safety is a bit nasty. CUDA allows to deal with plain 'void *',
> while OpenCL expects cl_mem. This suggests to use something like
> MatCreateSeqAIJWithCUDAArrays(__),
> MatCreateSeqAIJWithOpenCLArray__s(),
> but as I said above, I haven't come to a decision on that yet.
>
>
> Let me be more specific. I would not support this. I think it is wrong.
>
> You should create the Mat in the normal way and then pull out the backend
> storage. This way we have one simple interface for creation and
> preallocation,
> and eventually we make a nicer FEM interface to cover up the device pointer
> extraction.
>
Thanks for the input, I also prefer the 'one simple interface' approach.
Best regards,
Karli
More information about the petsc-dev
mailing list