Re: [mpiwg-p2p] [MPIWG Fortran] FP16 16-bit-floating-point
Hi Rolf, The Fortran 2015 draft is close to finished. Its IEEE-isms are based on ISO/IEC/IEEE 60559:2011, and includes a lot of changes based on that standard. If this FP16 feature is part of that standard, then we should look into making a change now. Otherwise, it would likely wait for the next revision. As Reinhold pointed out, the parameterized KIND scheme Fortran uses already permits identifying a KIND value for 16-bit floats, assuming the processor (i.e. compiler) knows about such a type. Changes to the standard would be minimal - add REAL16 to the iso_fortran_env module, with the value of -1 if that kind of real is not supported, and the value of 2 for most compilers if it is. Changes to the compiler would be significant. So implementation would likely wait for customer demand. Cheers, Bill
On Jun 16, 2017, at 2:44 PM, Rolf Rabenseifner <[email protected]> wrote:
(Because I'm not member of j3, only Reinhold's or Rich's answers will be visible for j3)
Based on Reinhold's answer, I make my questions more precise:
- Are there already some activities in J3 on this FP16 topic?
- When will the Fortran standard include REAL16 to support the new IEEE FP16 standard?
Best regards Rolf
----- Original Message -----
From: "Reinhold Bader" <[email protected]> To: "Rolf Rabenseifner" <[email protected]>, "fortran standards email list for J3" <[email protected]> Cc: "MPI-WG Fortran working group" <[email protected]>, "Atsushi Hori" <[email protected]>, "Martin Schulz" <[email protected]>, "MPI WG Point To Point Communications working group" <[email protected]> Sent: Friday, June 16, 2017 2:31:03 PM Subject: AW: FP16 16-bit-floating-point
Hello Rolf,
to the best of my knowledge, the answers are as follows:
Q1: Not in the sense of having an explicit name like the REAL32, REAL64, REAL128 names for specific integer kinds that were added to Fortran 2008. However, it is left free to implementors to create a new kind number in the implementation that could be returned by SELECTED_REAL_KIND() and, if IEEE conforming, by IEEE_SELECTED_REAL_KIND() and consequently all relevant IEEE support routines.
Q2: REAL*2 is (like REAL*8) a non-conforming notation (REAL*8 is supported as an extension by many implementations), so the answer is no. A proper declaration might look like
integer, parameter :: rk = selected_real_kind(2,6) ! at least 2 decimal digits and 6 maximal decimal exponent - hope I have this right ... real(KIND=rk) :: x
with the following caveats: * the KIND that fits the requirement most closely will be used, so it might be necessary to use the STORAGE_SIZE intrinsic to check what one gets. * KIND numbers are non-portable, so might vary for one and the same kind between implementations (at least one compiler I know deviates from all others I know).
I checked three of the compilers I know: they currently do not support FP16.
Regards Reinhold
-----Ursprüngliche Nachricht----- Von: Rolf Rabenseifner [mailto:[email protected]] Gesendet: Freitag, 16. Juni 2017 13:53 An: fortran standards email list for J3 <[email protected]>; Bader, Reinhold <[email protected]> Cc: MPI-WG Fortran working group <[email protected]>; Atsushi Hori <[email protected]>; Martin Schulz <[email protected]>; MPI WG Point To Point Communications working group <[email protected] forum.org> Betreff: FP16 16-bit-floating-point
Hi all together,
I'm sitting in the MPI Forum Meeting and we discuss the new IEEE FP16 datatype.
Questions to the Fortran atandardization body:
- Does the Fortran Standardization Body has already a proposal for the new name in Fortran for this IEEE FP16?
- Will be REAL*2 identical to IEEE FP16?
Best regards Rolf
-- Dr. Rolf Rabenseifner . . . . . . . . . .. email [email protected] . High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 . University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 . Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner . Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) .
-- Dr. Rolf Rabenseifner . . . . . . . . . .. email [email protected] . High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 . University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 . Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner . Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) . _______________________________________________ mpiwg-fortran mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran
Bill Long [email protected] Principal Engineer, Fortran Technical Support & voice: 651-605-9024 Bioinformatics Software Development fax: 651-605-9143 Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
participants (1)
-
Bill Long