From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.25]) by sourceware.org (Postfix) with ESMTPS id 97EF83858D3C for ; Tue, 17 May 2022 10:09:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 97EF83858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tkoenig.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=tkoenig.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1652782146; s=strato-dkim-0002; d=tkoenig.net; h=To:References:Message-Id:Date:Cc:In-Reply-To:From:Subject:Cc:Date: From:Subject:Sender; bh=0VVE2qY9NVMw5EI7KXdaC2x7L8je03WEALdCe2n67tk=; b=iqGnqfE9/ceCQejUC8BOPWJobf91f4VLWhUJumq+q2Mk3LOXTIJDXL4acSv++HBbgX Z68h08zXlPD9C0AbwCkCOH0VXlyYqedLhFILJHHSiDVJuu6nyPP1JSzKI7Y0iu0Vart+ bYG1yzRfFDclmnDADH1jMYvnrgfsUOrmH0sWn4wVGadVqyI/+XwPbkDYKCkntEJ7q2ID R7Oc7lhXxDSOO0jP+mhMqFZiKqhnx3mjKCMX5hcmm4EZ+lb4M/GNnqxAWIMhajI9msTK psnUINwO+zHHEMq6Mi+vRPglQox+Nr19atJciDirkjWT/vqxfhVPxz4IBy5Ur6te0l8p /xCQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":OGckYUunfvGNVUL0FlRnC4eRM+bOwx0+frxOSgq7RRSa88CpW+Py3yvZkFy/ep1AJSfh/BeszgvvVEHqRFV28RBlncWSPg==" X-RZG-CLASS-ID: mo00 Received: from smtpclient.apple by smtp.strato.de (RZmta 47.45.0 AUTH) with ESMTPSA id f05229y4HA95Iz2 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 17 May 2022 12:09:05 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: gfortran fp16 From: =?utf-8?Q?Thomas_K=C3=B6nig?= In-Reply-To: <82eabaad-a325-d061-023c-dc97e31b6e5f@mentor.com> Cc: Toon Moene , cglwdm@scu.edu.cn, fortran@gcc.gnu.org Date: Tue, 17 May 2022 12:09:04 +0200 Message-Id: <836D64F9-FA54-4DB3-BC12-2FA5464EA5EB@tkoenig.net> References: <82eabaad-a325-d061-023c-dc97e31b6e5f@mentor.com> To: Tobias Burnus X-Mailer: iPhone Mail (19E258) X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, KAM_SHORT, MIME_QP_LONG_LINE, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2022 10:09:13 -0000 Hi, be might complement to the QP support for POWER in gcc 12, and I have actual= ly thought about doing. The library has its gotchas, though - I do not suppo= se we can count on fp16 support for trigonometrics and similar, for example,= so we would probably have to use fp32 and convert (or imlement a lookup tab= le, which would be cache-unfriendly) Plus, there appears to be more than one= format on ARM, but we should probably restrict ourselves to IEEE. So, not a really small project, but an interesting one. Best regards Thomas > Am 16.05.2022 um 12: 50 schrieb Tobias Burnus : > =EF=BB=BFOn 16.05.22 09:51, nkToon Moene wrote: >> Interesting question. We don't do that yet, as far as I know. >> -------- Forwarded Message -------- >> From: =E9=99=88=E5=88=9A >>=20 >> I want to use fp16 in fortran, does gfortran support the fp16? >=20 > I think adding fp16 to the compiler itself is not that difficult =E2=80=93= it is > "just" handling 'HF' mode via 'REAL(kind=3D2)'; this can be done rather > quickly. >=20 > @=E9=99=88=E5=88=9A: If you want to volunteer to add it (know someone who d= oes), I can > give some pointers.* >=20 > Additionally support in the libgfortran run-time library should be added > and some testcases written to ensure it works. =E2=80=93 I think that is a= lso a > smaller task, but has to be done in addition. >=20 > Tobias >=20 > *See https://gcc.gnu.org/contribute.html for a starter =E2=80=93 but if > interested, I will give explicit hints what needs to be changed how. >=20 >=20 > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 20= 1, 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3=A4= ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaft: M= =C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955