<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class=""><div dir="auto" class="">What’s the plan going forward with this unified cuda/hip branch? </div></blockquote><div class=""><br class=""></div><div class="">The end goal is to integrate PetscDevice and PetscDeviceContext — new objects which encapsulates physical devices and device-side sets of operations respectively — into PETSc. PetscDeviceContext provides a framework for enqueueing work on device streams, but is far more extensible. <font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">For example, I extend it to a very basic graph-based “PetscCallGraph" implementation in </span></font><a href="https://gitlab.com/petsc/petsc/-/merge_requests/4217" class="">https://gitlab.com/petsc/petsc/-/merge_requests/4217</a><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">. </span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">I believe Junchao is also currently working on integrating SYCL into the PetscDevice framework.</span></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="auto" class="">Is this related to what some of us have been hearing about PETSc eventually going with a unified wrapper over both the CUDA and HIP API?</div></blockquote><br class=""></div><div class="">The unified CUDA-HIP wrapper exists mainly <font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">because both APIs similar enough that it made sense to wrap them, and is </span></font>the man in the middle between direct cuda/hip calls and higher-level PetscDevice/PetscDeviceContext API.</div><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); 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; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); 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; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Best regards,<br class=""><br class="">Jacob Faibussowitsch<br class="">(Jacob Fai - booss - oh - vitch)<br class=""></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Nov 10, 2021, at 12:28, Justin Chang <<a href="mailto:jychang48@gmail.com" class="">jychang48@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Jacob, </div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">What’s the plan going forward with this unified cuda/hip branch? Is this related to what some of us have been hearing about PETSc eventually going with a unified wrapper over both the CUDA and HIP API? </div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">We’re interested in making the HIP port more mature, including having support for the HIP part of HYPRE, but we’re unsure what direction you guys want to go with the GPU route.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thanks,</div><div dir="auto" class="">Justin</div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 10, 2021 at 12:19 PM Justin Chang <<a href="mailto:jychang48@gmail.com" class="">jychang48@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto" class="">Cc’ing Paul since I misspelled his email address initially</div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 10, 2021 at 12:17 PM Jacob Faibussowitsch <<a href="mailto:jacob.fai@gmail.com" target="_blank" class="">jacob.fai@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="word-wrap:break-word;line-break:after-white-space" class="">I’m in the process of implementing asynchronous GPU support for petsc. A side effect of this is that I unify the cuda/hip interface such that anywhere we have cuda-like code we will automatically also get the hip variant.<div class=""><br class=""></div><div class="">The scaffolding is in include/petsc/private/cupminterface.hpp, but for concrete examples see the <span style="" class="">jacobf/2021-10-21/veccupm-async branch for the WIP port of</span> VecSeq in src/vec/vec/impls/seq/seqcupm/veccupm.hpp.</div><div class=""><div class=""><br class=""><div class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; word-wrap: break-word; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; word-wrap: break-word; line-break: after-white-space;" class=""><div class="">Best regards,<br class=""><br class="">Jacob Faibussowitsch<br class="">(Jacob Fai - booss - oh - vitch)<br class=""></div></div></div>
</div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class="">
<div class=""><br class=""><blockquote type="cite" class=""><div class="">On Nov 10, 2021, at 11:50, Justin Chang <<a href="mailto:jychang48@gmail.com" target="_blank" class="">jychang48@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Paul Bauman was also involved with the HIP port of HYPRE. Several of us at AMD are interested in getting HIP support for PETSc in general, and having HYPRE support would greatly help</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 10, 2021 at 11:47 AM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" target="_blank" class="">stefano.zampini@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto" class="">I did the work last summer. It's already available in 3.16</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Mer 10 Nov 2021, 20:44 Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" class="">mfadams@lbl.gov</a>> ha scritto:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr" class="">Hypre has released HIP support and Ulrike says:<div class=""><br class=""></div><div class="">I just want to let you know that hypre can now be used through PETSc with GPUs (both Nvidia and AMD).<div class=""><div class=""><br class=""></div></div></div><div class="">I am guessing we have some work to do to make this happen.</div><div class=""><br class=""></div><div class="">What should I do?</div></div>
</blockquote></div>
</blockquote></div>
</div></blockquote></div><br class=""></div></div></div></blockquote></div></div>
</blockquote></div></div>
</div></blockquote></div><br class=""></body></html>