<div dir="ltr">OK good to know. I will now worry even less about making this very complete.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 2, 2020 at 1:33 PM Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
  Mark,<br>
<br>
   Currently you use directly the Nvidia provided mallocs cudaMalloc for all mallocs on the GPU. See for example <a href="http://aijcusparse.cu" rel="noreferrer" target="_blank">aijcusparse.cu</a>. <br>
<br>
   I will be using Stefano's work to start developing a unified PETSc based system for all memory management but don't wait for that.<br>
<br>
   Barry<br>
<br>
<br>
> On Sep 2, 2020, at 8:58 AM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br>
> <br>
> PETSc mallocs seem to boil down to PetscMallocAlign. There are switches in here but I don't see a Cuda malloc. THis would seem to be convenient if I want to create an Object entirely on Cuda or any device. <br>
> <br>
> Are there any thoughts along these lines or should I just duplicate Mat creation, for instance, by hand?<br>
<br>
</blockquote></div>