From: | Kohei KaiGai <kaigai(at)heterodb(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: FP16 Support? |
Date: | 2018-01-09 06:36:18 |
Message-ID: | CAOP8fzYJUVaZbmoCCZPhmu4EwFBaGc6jj2h9_usWgLzOpqq0dw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Just for your information.
I tried to implement "float2" according to IEEE 754 specification,
as a custom data type of PG-Strom.
https://github.com/heterodb/pg-strom/blob/master/src/float2.c
https://github.com/heterodb/pg-strom/blob/master/sql/float2.sql
The recent GPU device (Maxwell or later) supports "half" precision
data type by the hardware, so it might be valuable for somebody.
Thanks,
2017-11-14 14:49 GMT+09:00 Kohei KaiGai <kaigai(at)heterodb(dot)com>:
> 2017-11-14 10:33 GMT+09:00 Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>:
>> On Tue, Nov 14, 2017 at 1:11 PM, Kohei KaiGai <kaigai(at)heterodb(dot)com> wrote:
>>> Any opinions?
>>
>> The only reason I can think of for having it in core is that you might
>> want to use standard SQL notation FLOAT(10) to refer to it. Right now
>> our parser converts that to float4 but it could map precisions up to
>> 10 to float2. The need for such special treatment is one of my
>> arguments for considering SQL:2016 DECFLOAT(n) in core PostgreSQL.
>> But this case is different: FLOAT(10) already works, it just maps to a
>> type with a larger significand, as permitted by the standard. So why
>> not just do these short floats as an extension type?
>>
> Our extension will be able to provide its own "half" or "float2" data type
> using CREATE TYPE, indeed. I thought it is useful to other people, even
> if they are not interested in the in-database analytics with GPU, to reduce
> amount of storage consumption.
>
> Of course, it is my opinion.
>
> Thanks,
> --
> HeteroDB, Inc / The PG-Strom Project
> KaiGai Kohei <kaigai(at)heterodb(dot)com>
--
HeteroDB, Inc / The PG-Strom Project
KaiGai Kohei <kaigai(at)heterodb(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Tsunakawa, Takayuki | 2018-01-09 08:21:33 | RE: [HACKERS] Statement-level rollback |
Previous Message | Rushabh Lathia | 2018-01-09 05:44:53 | Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation) |