Fwd: gfortran fp16

2022-05-16 Thread Toon Moene

Interesting question. We don't do that yet, as far as I know.


 Forwarded Message 
Subject: gfortran fp16
Date: Mon, 16 May 2022 13:24:22 +0800 (GMT+08:00)
From: 陈刚 
To: gcc-h...@gcc.gnu.org

Dear experts,




I want to use fp16 in fortran, does gfortran support the fp16?




I didn't find the fp16 in gfortran but in C language.




Is there any solutions?




Best




Gang Chen




School of Mathematics



Sichuan University, China


Re: Fwd: gfortran fp16

2022-05-16 Thread Tobias Burnus

On 16.05.22 09:51, Toon Moene wrote:

Interesting question. We don't do that yet, as far as I know.
 Forwarded Message 
From: 陈刚 

I want to use fp16 in fortran, does gfortran support the fp16?


I think adding fp16 to the compiler itself is not that difficult – it is
"just" handling 'HF' mode via 'REAL(kind=2)'; this can be done rather
quickly.

@陈刚: If you want to volunteer to add it (know someone who does), I can
give some pointers.*

Additionally support in the libgfortran run-time library should be added
and some testcases written to ensure it works. – I think that is also a
smaller task, but has to be done in addition.

Tobias

*See https://gcc.gnu.org/contribute.html for a starter – but if
interested, I will give explicit hints what needs to be changed how.


-
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
München, HRB 106955