Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] data_unregister_submit() does not flush data from GPU to CPU

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] data_unregister_submit() does not flush data from GPU to CPU


Chronologique Discussions 
  • From: Aleksandr Mikhalev <aleksandr.mikhalev@kaust.edu.sa>
  • To: Samuel Thibault <samuel.thibault@inria.fr>
  • Subject: Re: [Starpu-devel] data_unregister_submit() does not flush data from GPU to CPU
  • Date: Tue, 24 Jul 2018 19:32:57 +0300
  • Authentication-results: v-zimmbxp21.srv.u-bordeaux.fr (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=kaust.edu.sa
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=aleksandr.mikhalev@kaust.edu.sa; spf=Pass smtp.mailfrom=aleksandr.mikhalev@kaust.edu.sa; spf=None smtp.helo=postmaster@mail-ed1-f54.google.com
  • Ironport-phdr: 9a23:mhpt7hH9uFJk2KHivkaVyp1GYnF86YWxBRYc798ds5kLTJ7zoMywAkXT6L1XgUPTWs2DsrQY07SQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDuwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VC+85Kl3VhDnlCYHNyY48G7JjMxwkLlbqw+lqxBm3oLYfJ2ZOP94c6jAf90VWHBBU95RWSNOH42yYYUPAfQDMuhbqIfyu1QAoACiBQm1AePj1j9IimP00KA8zu8vERvG3AslH98WrHnUqMv6NKQJUe+vyqnH0C/DZO5R1zf864jIcgouofWSUrJubMHczlMgFwfbgVWTsozqJTWV2fkXs2SB6upgVOGvi249pAF1vDev2NwhiorTiYII0VDE6T91z5goKt2lUkJ7esSrHYJWuiqHNIV2WtsvT390tCs+0LELup62cDIUxJg7xBPTcfyKfoeQ7h7+SOqcJS10iG9ndb6inRq+7EatxvHmWsWq3ltHoSxImcTWuH8XzRzc8M2HR+N9/ki/3TaP0Bje6uReLkA1karXMoAuzaMtmpYKv0TOHiD7lF/5jK+RcUUk9eyo5Pr9brr6oZ+cMpd4igD4MqswhsyyGfo0PhQKUmSB+umx1Kfv8VPlTLhJlPE7kqbUvIjfJcsBp665BwFV0pwk6xa6FzqpytAYkmcELFJeYh2HiZXmO0vULPD9DPe/gFSsny1vx//YIL3sGZbNIWLekLf6YbZx8VBTxxcuzdxF/JJbEKkNIOjvVU/pqNzYEhg5PhSow+bnCdVyzZkRWX+LAq+FK67TsF6I5uc0LOmWfoAZojf9K/4/5/7vl3A1g1EdfbP6lacQPUuxG+lrJw2lYXvmi8oFDS9epQM7UeHuzkGCUDRaenKud6M6/DAyToy8W9TtXIeo1ZWF0SSgF5tafChjC1OMGHPlac3QUvMBazmbJMN71DkFVrioT4I//RKnqRTmjbdrM6zP83tL5trYyNFp6riLxlkJ/jtuApHYijnVFjAmriYzXzYzmZtHjwl4w1aH37J/hqUER99a+uhVFAo2KNjHxr4jUoygakf6Zt6MDW2ebJC+GzhoEoAyysIVfwBwF8jklRmRh3P3UY9QrKSCAdkPyoyZ33X1IJwgmXPP1a1kglV/B8USaSupgalw8wWVDInMwR2U
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel/>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>
  • Resent-date: Tue, 24 Jul 2018 18:34:57 +0200
  • Resent-from: Samuel Thibault <samuel.thibault@ens-lyon.org>
  • Resent-message-id: <20180724163457.uir4mixaeehkgivg@var.youpi.perso.aquilenet.fr>
  • Resent-to: starpu-devel@lists.gforge.inria.fr

Thank you very much for fast answer!

So, I misunderstood meaning of "*_submit()” family of functions. At first, I
thought it adds asynchronous task, where the handle is flushed to its origin
asynchronously: nobody knows when it will happen, but it will happen for
sure. I input data on CPU, create task to update this data on GPU and do not
do anything else, just wait for all tasks to finish. Resulting data on GPU is
what I need to display. If I use starpu_data_unregister(), data is brought
back from GPU to CPU and handle is destroyed, but if I use
starpu_data_unregister_submit(), handle is destroyed without copying at all,
even if I wait for all tasks to finish. From my point of view, it is
counterintuitive, that synchronous call copies data and asynchronous call
does not copy data. Can you confirm, that this difference is intended?

Proposed solution with data_acquire is much more advanced, adding explicit
empty task to synchronise data is easier.

Best regards,
Aleksandr.

> On 24 Jul 2018, at 18:39, Samuel Thibault <samuel.thibault@inria.fr> wrote:
>
> Hello,
>
> Aleksandr Mikhalev, le mar. 24 juil. 2018 16:18:36 +0300, a ecrit:
>> If I understood correctly, idea of “submit” functions is to hint StarPU to
>> flush data from GPU to CPU,
>
> No, "submit" means that it is asynchronous, i.e. it retuns immediately
> without waiting for the result.
>
>> StarPU does not copy output data from GPU to CPU if corresponding handle
>> is destroyed by starpu_data_unregister_submit().
>
> Well, yes, and that is what is documented.
>
> I don't actually really see how it would be useful to copy output
> back from GPU to CPU: since it is asynchronous, you have no way of
> knowing when that will be effective. If you want to bring back data
> to the CPU, either use starpu_data_acquire(STARPU_R) (synchronous) or
> starpu_data_acquire_cb(STARPU_R) (asynchronous but with a callback
> called when the data up to date on the CPU) and starpu_data_release()
>
>> The same holds true for starpu_invalidate_data_submit().
>
> Well, yes, invalidate_data_submit() is explicitly exactly meant to
> discard the value of a data.
>
> Samuel


--

This message and its contents, including attachments are intended solely
for the original recipient. If you are not the intended recipient or have
received this message in error, please notify me immediately and delete
this message from your computer system. Any unauthorized use or
distribution is prohibited. Please consider the environment before printing
this email.





Archives gérées par MHonArc 2.6.19+.

Haut de le page