<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 18, 2021 at 4:04 PM Fande Kong <<a href="mailto:fdkong.jd@gmail.com">fdkong.jd@gmail.com</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"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 18, 2021 at 1:55 PM Junchao Zhang <<a href="mailto:junchao.zhang@gmail.com" target="_blank">junchao.zhang@gmail.com</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"><div dir="ltr"><div>VecScatter (i.e., SF, the two are the same thing) setup (building various index lists, rank lists) is done on the CPU.  is1, is2 must be host data. </div></div></blockquote><div><br></div><div>Just out of curiosity, is1 and is2 can not be created on a GPU device in the first place? That being said, it is technically impossible? Or we just did not implement them yet?<br></div></div></div></blockquote><div>Simply because we do not have an ISCUDA class.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div><div><br></div><div>Fande,<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>When the SF is used to communicate device data, indices are copied to the device..</div><div><br></div><div>--Junchao Zhang<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 18, 2021 at 11:50 AM Patrick Sanan <<a href="mailto:patrick.sanan@gmail.com" target="_blank">patrick.sanan@gmail.com</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"><div>I'm trying to understand how VecScatters work with GPU-native Kokkos Vecs. <div><br></div><div>Specifically, I'm interested in what will happen in code like in src/vec/vec/tests/ex22.c, </div><div><br></div><div><code><span><span style="white-space:pre-wrap">     </span>ierr</span> <span>=</span> <span>VecScatterCreate</span><span>(</span><span>x</span><span>,</span><span>is1</span><span>,</span><span>y</span><span>,</span><span>is2</span><span>,</span><span>&</span><span>ctx</span><span>);</span><span>CHKERRQ</span><span>(</span><span>ierr</span><span>);</span></code></div><div><br></div><div>(from <a href="https://gitlab.com/petsc/petsc/-/blob/master/src/vec/vec/tests/ex22.c#L44" target="_blank">https://gitlab.com/petsc/petsc/-/blob/master/src/vec/vec/tests/ex22.c#L44</a>)</div><div><br></div><div>Here, x and y can be set to type KOKKOS using -vec_type kokkos at the command line. But is1 and is2 are (I think), always</div><div>CPU/host data. Assuming that the scatter itself can happen on the GPU, the indices must make it to the device somehow - are they copied there when the scatter is created? Is there a way to create the scatter using indices already on the GPU (Maybe using SF more directly)?</div><div><br></div></div></blockquote></div>
</blockquote></div></div>
</blockquote></div></div>