Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] Support for half precision

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] Support for half precision


Chronologique Discussions 
  • From: Hatem Ltaief <hatem.ltaief@kaust.edu.sa>
  • To: Samuel Thibault <samuel.thibault@inria.fr>
  • Cc: "starpu-devel@lists.gforge.inria.fr" <starpu-devel@lists.gforge.inria.fr>, "Sameh M. Abdulah" <sameh.abdulah@kaust.edu.sa>, "Nicolas L. Doucet" <nicolas.doucet@kaust.edu.sa>
  • Subject: Re: [Starpu-devel] Support for half precision
  • Date: Thu, 31 Jan 2019 20:51:26 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=hatem.ltaief@kaust.edu.sa; spf=Pass smtp.mailfrom=prvs=593425f3d1=hatem.ltaief@kaust.edu.sa; spf=None smtp.helo=postmaster@mx08-0025e101.pphosted.com
  • Ironport-phdr: 9a23:163+ehy7a50XITXXCy+O+j09IxM/srCxBDY+r6Qd0uoXLvad9pjvdHbS+e9qxAeQG9mDu7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHPYAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7Vq4/Vyi84Kh3SR/okCYHOCA/8GHLkcx7kaZXrAu8qxBj34LYZYeYP+d8cKzAZ9MXXWpPUNhMWSxdDI2ybIUPAOgdMuhXoIbwvEcOrQK7BQWwGO/j1iFEi3nr1qM6yeQhFgTG0RQiEd0UrHTbstD1P7oUX+Cp1qbIzCvMb/1L0jr66IjHaAwhru+JXb5qdcrR1VMgFwLbgVWesoHlPCma1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developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Hi Sam,
We have actually used half size of the 32bits tile from chameleon to stuff in
whole 16bits tile. All kernels run on GPUs/tensor cores.
This is a hack In chameleon while waiting for a mature bfloat support for
half precision on x86.
Thanks
Hatem

Sent from my iPhone

> On Jan 31, 2019, at 18:33, Samuel Thibault <samuel.thibault@inria.fr> wrote:
>
> Hello,
>
> Getting back to an old pending mail.
>
> Samuel Thibault, le ven. 19 oct. 2018 17:24:57 +0200, a ecrit:
>> Hatem Ltaief, le ven. 19 oct. 2018 15:20:24 +0000, a ecrit:
>>> We would like to use a tile matrix in single precision to host tiles in
>>> single precision as well as tiles in half precision. When about to
>>> operate on tiles containing half precision data, then only half of the
>>> data tile is meaningful, we would like starpu to transfer only the
>>> meaningful data from the tiles when needed, ie full data tile for single
>>> precision and half data tile for half precision.
>>> Basically, you are saying that we can allocate our overall matrix with
>>> tile data structure in single precision, and at the time of the starpu
>>> data registration done on a tile-basis, we should specify the proper
>>> element size.
>>> Is that correct?
>>
>> Are the half-precision elements contiguous in memory?
>
> From what I see in the CUBLAS documentation for e.g. cublasHgemm, and SO
> like
> https://stackoverflow.com/questions/43120062/cuda-cublas-and-half-precision-data-types
> https://stackoverflow.com/questions/32735292/can-anyone-provide-sample-code-demonstrating-the-use-of-16-bit-floating-point-in
> they are contiguous. So the overall matrix with tile data structure
> needs to be allocated in half precision, and registered to starpu with
> the half-precision element size. Probably Chameleon needs to be extended
> for that element size.
>
> Now, when you want to mix both single precision and half-precision
> parameters for the same task, you'll need to implement the corresponding
> CUDA kernel.
>
> Samuel




Archives gérées par MHonArc 2.6.19+.

Haut de le page