Accéder au contenu.
Menu Sympa

starpu-devel - [Starpu-devel] Question: STARPU_SPMD and buffer sharing

Objet : Developers list for StarPU

Archives de la liste

[Starpu-devel] Question: STARPU_SPMD and buffer sharing


Chronologique Discussions 
  • From: "Jan Polák" <456647@mail.muni.cz>
  • To: starpu-devel@lists.gforge.inria.fr
  • Subject: [Starpu-devel] Question: STARPU_SPMD and buffer sharing
  • Date: Mon, 22 Jul 2019 14:53:59 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=456647@mail.muni.cz; spf=Pass smtp.mailfrom=456647@mail.muni.cz; spf=None smtp.helo=postmaster@arethusa2.fi.muni.cz
  • Ironport-phdr: 9a23:/U8nZhQoXm88ZZj+alqAy0G+/tpsv+yvbD5Q0YIujvd0So/mwa69YheN2/xhgRfzUJnB7Loc0qyK6vqmBjBLvMnJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MQu6oR/Tu8QZjodvKqQ8wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMTMy7WPZhdFqjK9DvB2uuhNxzYnbb4+VKvRwY6DTc90BSGpdXctcTTBNAo2gY4YNCecKIOZWr5P6p1sLtRayCw2iC/npyjRVnHH22qk61OYiEQ3IwQctGN0DvXTVodj0O6ofU/u4zKzSwjXCa/NawzL96JXOchAgu/2DQbNxfNPXxEIyGQ3FiVCQppbkPzOTzukNvGmb7/ZgVeKykGErsR1+oj+qxsoql4LHhZoVx0jZ+Sh2wos5P8O0RU5mbdK+H5ZdszuWOolwT8g/WW9nojw6xacDuZOjfCgF1pAnxxnHZvOdaYiH/A7jVOaMITdjnn1pZqizhxiz8US6z+38S8+00FdQoiVZk9jArnEN1xrN5cibUvZx40is1DSV2wzN6uxIPFo4mKXfJpI7wLM8jp8Tvl7CHi/ylkX2lqiWdkA89+Wn6+nqY7Trq5CeOoJvjwHxKKUumsilDeQ9LwgOWWmb9f6g27zi5UH5WqlFjuUqkqnFt5DXPd8bprKjDA9PyoYj9g+zACq439QGg3YHKElIeBaGj4jyJ1HOO+r0Dfixg1SrijdryO7JMqfgApXLNHjDka3ucaxz605Gm0IPyoVE+5tOEqxELP/tV0vZsN3DEgR/PAKz2enqTtR7zIIXH2yVUYGDN6aH+32B4KoXJO0FZ8Vd7GqgdaZ5uNbrhH4931oAe6jv1olBOyPwJehvP0jMOSmkudwGC2pf5lNiHtyvs0WLVHtoX1j3R7g1v21pDYunCcHGW4asxreTjn/iT89mI1teA1XJKk/GMoCNWvMCciWXe5MzlzUFUf6kVokgkxq85lajluhXa9HM8yhdjqrNkdh44+qJz0M77zFoD9mG2jvLQWAym34ORnk9zvInrA==
  • 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>

Hello,

I am experimenting with StarPU on a tool from https://github.com/I2PC/xmipp
and I have encountered two things I'd like to ask about.

1. Does starpu_codelet_type (STARPU_SPMD in particular) apply to non-CPU tasks
as well? The documentation is not explicit about it and I've been unable to
find anything in the StarPU source to confirm it either way. The
cg/cg_kernels.c in examples does seem to rely on SPMD having effect only on
CPU tasks, but that could be an oversight. To be clear, I need SPMD only for
the CPU implementation of the codelet and I don't want to deal with it on GPU
(CUDA).

By the way, there seems to be a minor mistake in the documentation of
starpu_combined_worker_get_rank(), which claims that it is useful only in
FORKJOIN parallel tasks, but full documentation mentions this procedure only
in
relation to SPMD.


2. Is there a way to allow multiple tasks to concurrently read/write to the
same buffer? In my application I have a pretty large buffer which is accessed
in REDUX mode by multiple tasks of the identic codelet. What usually happens,
is that there are multiple tasks running in parallel on the CPU and about two
on the GPU. The REDUX mode makes this possible, which is great, but N tasks
running in parallel require N copies of the buffer across CPU and GPU memory,
while only 2 copies are really needed: one for GPU and one for CPU. Concurrent
access is not a problem, since the algorithm already requires atomic access
for
unrelated reasons.

I have been unable to find anything which would provide this functionality.
Also, this is not just an space optimization: in some cases, the buffer can be
so large, that the GPU can't fit two in its memory (and similarly for CPU),
which means that only one worker is active and the GPU is under-utilized
between tasks.

Is there currently a way to achieve this behavior? And if not, could you
please provide some hints on how to implement this?


Thank you for your answer in advance and thank you for StarPU in general, it
is a great tool.

Have a nice day,
Jan Polák




Archives gérées par MHonArc 2.6.19+.

Haut de le page