<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> Alberto,<div><br></div><div> We don't have such a routine yet, but we should and it would not be terribly difficult to implement (using pieces of PETSc that already exist and cut and pasting them into a new function MatCreateSeqAICUSPARSEWithArrays()).</div><div><br></div><div> Barry</div><div><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Jan 13, 2026, at 1:44 PM, Alberto Cattaneo via petsc-users <petsc-users@mcs.anl.gov> wrote:</div><br class="Apple-interchange-newline"><div><div class="elementToProof" id="UniqueMessageBody_8" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class="elementToProof" style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">Greetings</div><div class="elementToProof" style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">I hope this email reaches you all well. I was wondering whether it was possible to create PETSc mat objects directly from data that exists on the GPU in AIJ format without copying? For example, either via DLPack or just an assurance that the pointer provided to a creation method is in the needed AIJ format? Ideally, I'd like to be able to build a PETSc AIJCUSPARSE object out of data created by another program. I know there are a few builder methods and paradigms, but I'm a bit confused as to which would be ideal in this circumstance since in some sense the matrix is already created in memory, just not as a PETSc object.</div><div class="elementToProof" style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">Thank you for your assistance, please let me know if I should provide more information.</div><div class="elementToProof" style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">Respectfully:</div><div class="elementToProof" style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">Alberto Cattaneo</div></div></div></blockquote></div><br></div></body></html>