Objet : Developers list for StarPU
Archives de la liste
Re: [Starpu-devel] Possible bug (scratch data + combined workers + version 1.3)
Chronologique Discussions
- From: Aleksandr Mikhalev <aleksandr.mikhalev@kaust.edu.sa>
- To: Samuel Thibault <samuel.thibault@inria.fr>
- Cc: starpu-devel@lists.gforge.inria.fr
- Subject: Re: [Starpu-devel] Possible bug (scratch data + combined workers + version 1.3)
- Date: Thu, 6 Sep 2018 14:33:08 +0300
- Authentication-results: mail2-smtp-roc.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-f48.google.com
- Ironport-phdr: 9a23:ifP6rxMslsAWv9Vulhsl6mtUPXoX/o7sNwtQ0KIMzox0IvX7rarrMEGX3/hxlliBBdydt6obzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxlKiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPdeRWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbYUwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0vRz+s87lkRwPpiCcfNj427mfXitBrjKlGpB6tvgFzz5LIbI2QMvd1Y6HTcs4ARWdZUclfSixPDYGyYYUMAeoPI+FWoJXyqVYVsRu+HAysCP/vyjNUm3P727Ax3eQ7EQHB2QwtB84DsHDKo9X2L6cdS+a1w7TSzT7eaP1W2DT96IjSfRAlv/6MQ697fM3LxkkrCQzFjU6QppbjPzyIzOQBqW2b7+tjVeKvkWEnrx9+oia0y8cvkIbJm5kVykze+Spn3Yk1OMe0SFVhbtO9FpZbqiKUN5NuT888X21lvDw2x74GtJKhYiQG1JcqywTQZvGEa4SE/w7vWeKLLTtlhn9pZaiziwu8/ES80OHwSMe53VlMoyFYiNfDrGoN2AbW6sWfSvty4EOh2TGX2gDW8O5EIEQ0mbPFJJE837I8j5QTvEvAEyPsl0X2i6iWdkog+ue28ejofrLmppqEO491jAHxLLgul9ShDegkNgUCRWuW9OSm2LH94UH0Q69Gg/I1n6XBtZDVP8Ubpqq3Aw9P1YYj7g6yAC2i0NsGnnkHN0hKeBSagIjzIV3OJfH4DfS/g1u2lDdk2e7GM6biAprXM3jDi6vhcaxj5EFB1Qo/18tf6IhMBrEbPP3zQlPxtMDfDhIhKAy03/zoCM9l1oMDQG6AH7GWML3Mvl+M/e8vJ+iMZJQJuDbmMfQl6PDujXgjmV8SY6alx5oXaHaiHvRnOUqVe3Tsgs1SWVsN6zE3SfHnjBW+UT9Zbmu2Q+po/Tg+FY+iS5vDR4qknbid9Ca9BJxfIG5cXAOiC3DtIqyAVvQXYSSeOIdEkz8EXLysVcd13BWjtxTzzbZ9aO/V+S0RsZ/9/Nt8+vbP0xw+6HpvBpLOgCm2U2hokzZQFHcN16dlrBk4kw/biPkqs7ljDdVWoshxfEI/PJ/YwfZ9DomuCAHIY8yVDluqX5O9CGNoF45j85o1e094Xu6aoFXbxSPzX+0WnqGQGNo5/r+axHGjf58gmUaD77EoihwdeuUKNWCigfQipQ3aBoqMnknA0qj2JeIT2ynC8GrFxm2L7hlV
- 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>
Indeed, per-worker or per-task allocation of a scratch is a nice question.
However, StarPU already have mechanism to obtain per-worker temporary working
space by calling proper codelet once for each worker. This method of
per-worker temporary space allocation is not suitable for situations, when
you need to generate data in one codelet and pass it to another. To pass data
to another codelet one has to use per-task temporary data. So, my assumption
is that STARPU_SCRATCH memory should be allocated on a per-task basis no
matter single or combined worker and user has to be careful with simultaneous
writes. Since presented test code works correctly with StarPU 1.2, I assume
someone who coded scratch data for combined workers used the same logics.
In my application, I generate data in one codelet and pass it to another
codelet, spoiling it. And I do it in a parallel way, since second codelet is
optimised for batches of data. I mean second codelet does the same operation
on a differently generated data. Data itself is spoiled after second codelet
and is not used in any other computations, so, as I think, STARPU_SCRATCH
modifier fits best.
In a few words, assume you need to do SVD of many independent small matrices
on a hybrid CPU/GPU system/cluster. Since matrices are small, GPU hardware is
not fully utilised when doing SVD of matrices one after another. One of
possible solutions is to use batches of matrices instead of single matrices.
And amount of matrices in each batch should be not less, than 200. Since
corresponding GPU and CPU codelets must take the same input, we come to a
problem of doing the same batches on each CPU worker separately. When there
is only one batch of 200 matrices, only one worker does the job and it does
it sequentially. This is where combined workers of StarPU look really
promising. Since we have batch of input data, it is intuitive to support
batch of scratch data for each given task. Which means STARPU_SCRATCH should
be allocated on a per-task basis, no matter how many workers are going to
work on that.
Regards,
Aleksandr.
> On 5 Sep 2018, at 17:09, Samuel Thibault <samuel.thibault@inria.fr> wrote:
>
> Hello,
>
> Aleksandr Mikhalev, le mer. 05 sept. 2018 12:23:15 +0300, a ecrit:
>> I think I discovered strange behaviour of StarPU 1.3,
>
> Mmm, actually I don't think anybody ever thought about scratch +
> parallel tasks, so it's little wonder that it broke :)
>
> I'm however wondering: in such case should we make all workers of the
> combined worker use the same scratch area, or should it be per-worker ?
> Mmm...
>
> 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.
- [Starpu-devel] Possible bug (scratch data + combined workers + version 1.3), Aleksandr Mikhalev, 05/09/2018
- Re: [Starpu-devel] Possible bug (scratch data + combined workers + version 1.3), Samuel Thibault, 05/09/2018
- Re: [Starpu-devel] Possible bug (scratch data + combined workers + version 1.3), Aleksandr Mikhalev, 06/09/2018
- Re: [Starpu-devel] Possible bug (scratch data + combined workers + version 1.3), Aleksandr Mikhalev, 06/09/2018
- Re: [Starpu-devel] Possible bug (scratch data + combined workers + version 1.3), Aleksandr Mikhalev, 06/09/2018
- Re: [Starpu-devel] Possible bug (scratch data + combined workers + version 1.3), Samuel Thibault, 05/09/2018
Archives gérées par MHonArc 2.6.19+.