Re: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16

2021-07-15 Thread Hongtao Liu via Gcc-patches
o Liu > Sent: Thursday, July 15, 2021 2:35 PM > To: Wang, Pengfei > Cc: Craig Topper ; Jakub Jelinek ; > Liu, Hongtao ; gcc-patches@gcc.gnu.org; Joseph Myers > > Subject: Re: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16 > > On Thu, Jul 15, 2021 at 10:07 AM Wang,

RE: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16

2021-07-14 Thread Wang, Pengfei via Gcc-patches
linek ; Liu, Hongtao ; gcc-patches@gcc.gnu.org; Joseph Myers Subject: Re: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16 On Thu, Jul 15, 2021 at 10:07 AM Wang, Pengfei wrote: > > Clang for AArch64 promotes each individual operation and rounds immediately > afterwards. https:/

Re: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16

2021-07-14 Thread Hongtao Liu via Gcc-patches
Craig Topper > via llvm-dev > Sent: Wednesday, July 14, 2021 11:32 PM > To: Hongtao Liu > Cc: Jakub Jelinek ; llvm-dev ; > Liu, Hongtao ; gcc-patches@gcc.gnu.org; Joseph Myers > > Subject: Re: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16 > > > > On Wed

RE: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16

2021-07-14 Thread Wang, Pengfei via Gcc-patches
cc.gnu.org; Joseph Myers Subject: Re: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16 On Wed, Jul 14, 2021 at 12:45 AM Hongtao Liu via llvm-dev mailto:llvm-...@lists.llvm.org>> wrote: > > > Set excess_precision_type to FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 to > round aft

Re: [llvm-dev] [PATCH 0/2] Initial support for AVX512FP16

2021-07-14 Thread Craig Topper via Gcc-patches
On Wed, Jul 14, 2021 at 12:45 AM Hongtao Liu via llvm-dev < llvm-...@lists.llvm.org> wrote: > > > > > Set excess_precision_type to FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 to > > round after each operation could keep semantics right. > > And I'll document the behavior difference between soft-fp and > >

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-14 Thread Hongtao Liu via Gcc-patches
> > > Set excess_precision_type to FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 to > round after each operation could keep semantics right. > And I'll document the behavior difference between soft-fp and > AVX512FP16 instruction for exceptions. I got some feedback from my colleague who's working on supportin

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-06 Thread Hongtao Liu via Gcc-patches
On Wed, Jul 7, 2021 at 2:11 AM Joseph Myers wrote: > > On Tue, 6 Jul 2021, Hongtao Liu via Gcc-patches wrote: > > > There may be inconsistent behavior between soft-fp and avx512fp16 > > instructions if we emulate _Float16 w/ float . > > i.e > > 1) for a + b - c where b and c are variables with

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-06 Thread Joseph Myers
On Tue, 6 Jul 2021, H.J. Lu via Gcc-patches wrote: > > > So the key point is that the soft-fp and avx512fp16 instructions may > > > do not behave the same on the exception, is this acceptable? > > > > I think that's quite often the case for soft-fp. > > So this is a GCC limitation. Please docume

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-06 Thread Joseph Myers
On Tue, 6 Jul 2021, Richard Biener via Gcc-patches wrote: > > /* Look for a wider mode of the same class for which we think we > > can open-code the operation. Check for a widening multiply at the > > wider mode as well. */ > > > > if (CLASS_HAS_WIDER_MODES_P (mclass) > > &&

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-06 Thread Joseph Myers
On Tue, 6 Jul 2021, Hongtao Liu via Gcc-patches wrote: > There may be inconsistent behavior between soft-fp and avx512fp16 > instructions if we emulate _Float16 w/ float . > i.e > 1) for a + b - c where b and c are variables with the same big value > and a + b is NAN at _Float16 and real value

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-06 Thread H.J. Lu via Gcc-patches
On Tue, Jul 6, 2021 at 3:15 AM Richard Biener via Gcc-patches wrote: > > On Tue, Jul 6, 2021 at 10:46 AM Hongtao Liu wrote: > > > > On Thu, Jul 1, 2021 at 9:04 PM Jakub Jelinek via Gcc-patches > > wrote: > > > > > > On Thu, Jul 01, 2021 at 02:58:01PM +0200, Richard Biener wrote: > > > > > The ma

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-06 Thread Richard Biener via Gcc-patches
On Tue, Jul 6, 2021 at 10:46 AM Hongtao Liu wrote: > > On Thu, Jul 1, 2021 at 9:04 PM Jakub Jelinek via Gcc-patches > wrote: > > > > On Thu, Jul 01, 2021 at 02:58:01PM +0200, Richard Biener wrote: > > > > The main issue is complex _Float16 functions in libgcc. If _Float16 > > > > doesn't > > >

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-06 Thread Hongtao Liu via Gcc-patches
On Fri, Jul 2, 2021 at 4:46 AM Joseph Myers wrote: > > Some general comments, following what I said on libc-alpha: > > > 1. Can you confirm that the ABI being used for 64-bit, for _Float16 and > _Complex _Float16 argument passing and return, follows the current x86_64 > ABI document? > > > 2. Can

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-06 Thread Hongtao Liu via Gcc-patches
On Thu, Jul 1, 2021 at 9:04 PM Jakub Jelinek via Gcc-patches wrote: > > On Thu, Jul 01, 2021 at 02:58:01PM +0200, Richard Biener wrote: > > > The main issue is complex _Float16 functions in libgcc. If _Float16 > > > doesn't > > > require -mavx512fp16, we need to compile complex _Float16 function

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-05 Thread Richard Biener via Gcc-patches
On Mon, Jul 5, 2021 at 3:21 AM Hongtao Liu via Gcc-patches wrote: > > On Fri, Jul 2, 2021 at 4:03 PM Uros Bizjak wrote: > > > > On Fri, Jul 2, 2021 at 8:25 AM Hongtao Liu wrote: > > > > > > > AVX512FP16 is disclosed, refer to [1]. > > > > > There're 100+ instructions for AVX512FP16, 67 gcc p

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-04 Thread Hongtao Liu via Gcc-patches
On Fri, Jul 2, 2021 at 4:03 PM Uros Bizjak wrote: > > On Fri, Jul 2, 2021 at 8:25 AM Hongtao Liu wrote: > > > > > AVX512FP16 is disclosed, refer to [1]. > > > > There're 100+ instructions for AVX512FP16, 67 gcc patches, for the > > > > convenience of review, we divide the 67 patches into 2 m

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-03 Thread Hongtao Liu via Gcc-patches
On Fri, Jul 2, 2021 at 4:19 PM Richard Biener wrote: > > On Fri, Jul 2, 2021 at 10:07 AM Uros Bizjak via Gcc-patches > wrote: > > > > On Fri, Jul 2, 2021 at 8:25 AM Hongtao Liu wrote: > > > > > > > AVX512FP16 is disclosed, refer to [1]. > > > > > There're 100+ instructions for AVX512FP16, 67

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-02 Thread Richard Biener via Gcc-patches
On Fri, Jul 2, 2021 at 10:07 AM Uros Bizjak via Gcc-patches wrote: > > On Fri, Jul 2, 2021 at 8:25 AM Hongtao Liu wrote: > > > > > AVX512FP16 is disclosed, refer to [1]. > > > > There're 100+ instructions for AVX512FP16, 67 gcc patches, for the > > > > convenience of review, we divide the 67

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-02 Thread Uros Bizjak via Gcc-patches
On Fri, Jul 2, 2021 at 8:25 AM Hongtao Liu wrote: > > > AVX512FP16 is disclosed, refer to [1]. > > > There're 100+ instructions for AVX512FP16, 67 gcc patches, for the > > > convenience of review, we divide the 67 patches into 2 major parts. > > > The first part is 2 patches containing bas

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-01 Thread Hongtao Liu via Gcc-patches
On Thu, Jul 1, 2021 at 7:10 PM Uros Bizjak wrote: > > [Sorry for double post, gcc-patches address was wrong in original post] > > On Thu, Jul 1, 2021 at 7:48 AM liuhongt wrote: > > > > Hi: > > AVX512FP16 is disclosed, refer to [1]. > > There're 100+ instructions for AVX512FP16, 67 gcc patches

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-01 Thread Joseph Myers
On Thu, 1 Jul 2021, H.J. Lu via Gcc-patches wrote: > The main issue is complex _Float16 functions in libgcc. If _Float16 doesn't > require -mavx512fp16, we need to compile complex _Float16 functions in > libgcc without -mavx512fp16. Complex _Float16 performance is very > important for our _Float

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-01 Thread Joseph Myers
Some general comments, following what I said on libc-alpha: 1. Can you confirm that the ABI being used for 64-bit, for _Float16 and _Complex _Float16 argument passing and return, follows the current x86_64 ABI document? 2. Can you confirm that if you build with this instruction set extension

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Jul 01, 2021 at 02:58:01PM +0200, Richard Biener wrote: > > The main issue is complex _Float16 functions in libgcc. If _Float16 doesn't > > require -mavx512fp16, we need to compile complex _Float16 functions in > > libgcc without -mavx512fp16. Complex _Float16 performance is very > > impo

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-01 Thread Uros Bizjak via Gcc-patches
On Thu, Jul 1, 2021 at 2:40 PM H.J. Lu wrote: > > On Thu, Jul 1, 2021 at 4:10 AM Uros Bizjak wrote: > > > > [Sorry for double post, gcc-patches address was wrong in original post] > > > > On Thu, Jul 1, 2021 at 7:48 AM liuhongt wrote: > > > > > > Hi: > > > AVX512FP16 is disclosed, refer to [1]

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-01 Thread Richard Biener via Gcc-patches
On Thu, Jul 1, 2021 at 2:41 PM H.J. Lu via Gcc-patches wrote: > > On Thu, Jul 1, 2021 at 4:10 AM Uros Bizjak wrote: > > > > [Sorry for double post, gcc-patches address was wrong in original post] > > > > On Thu, Jul 1, 2021 at 7:48 AM liuhongt wrote: > > > > > > Hi: > > > AVX512FP16 is disclos

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-01 Thread H.J. Lu via Gcc-patches
On Thu, Jul 1, 2021 at 4:10 AM Uros Bizjak wrote: > > [Sorry for double post, gcc-patches address was wrong in original post] > > On Thu, Jul 1, 2021 at 7:48 AM liuhongt wrote: > > > > Hi: > > AVX512FP16 is disclosed, refer to [1]. > > There're 100+ instructions for AVX512FP16, 67 gcc patches

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-01 Thread Uros Bizjak via Gcc-patches
[Sorry for double post, gcc-patches address was wrong in original post] On Thu, Jul 1, 2021 at 7:48 AM liuhongt wrote: > > Hi: > AVX512FP16 is disclosed, refer to [1]. > There're 100+ instructions for AVX512FP16, 67 gcc patches, for the > convenience of review, we divide the 67 patches into

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-06-30 Thread Hongtao Liu via Gcc-patches
On Thu, Jul 1, 2021 at 1:48 PM liuhongt wrote: > > Hi: > AVX512FP16 is disclosed, refer to [1]. > There're 100+ instructions for AVX512FP16, 67 gcc patches, for the > convenience of review, we divide the 67 patches into 2 major parts. > The first part is 2 patches containing basic support f