Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-17 Thread Robin Dapp via Gcc-patches
> I'm not opposed to merging the test change, but I couldn't figure out > where in C the implicit conversion was coming from: as far as I can > tell the macros don't introduce any (it's "return _float16 * > _float16"), I'd had the patch open since last night but couldn't > figure it out. > > We

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-16 Thread Palmer Dabbelt
On Wed, 16 Aug 2023 15:59:13 PDT (-0700), jeffreya...@gmail.com wrote: On 8/16/23 07:50, Robin Dapp wrote: But if it's a float16 precision issue then I would have expected both the computations for the lhs and rhs values to have suffered similarly. Yeah, right. I didn't look closely

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-16 Thread Jeff Law via Gcc-patches
On 8/16/23 07:50, Robin Dapp wrote: But if it's a float16 precision issue then I would have expected both the computations for the lhs and rhs values to have suffered similarly. Yeah, right. I didn't look closely enough. The problem is not the reduction but the additional return-value

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-16 Thread Robin Dapp via Gcc-patches
> But if it's a float16 precision issue then I would have expected both > the computations for the lhs and rhs values to have suffered > similarly. Yeah, right. I didn't look closely enough. The problem is not the reduction but the additional return-value conversion that is omitted when

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-16 Thread juzhe.zh...@rivai.ai
LGTM juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-08-15 23:49 To: gcc-patches; palmer; Kito Cheng; jeffreyalaw; juzhe.zh...@rivai.ai CC: rdapp.gcc Subject: [PATCH] RISC-V: Fix reduc_strict_run-1 test case. Hi, this patch changes the equality check for the reduc_strict_run-1 testcase

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/15/23 19:21, juzhe.zh...@rivai.ai wrote: For float/double, the in-order fold-left reduction produced the same result as scalar codes. But for _Float16 is not, I think the issue is not the reduction issue, is float 16 precision issue. But if it's a float16 precision issue then I would

Re: Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread juzhe.zh...@rivai.ai
; palmer; Kito Cheng; juzhe.zh...@rivai.ai Subject: Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case. On 8/15/23 09:49, Robin Dapp wrote: > Hi, > > this patch changes the equality check for the reduc_strict_run-1 > testcase from == to fabs () < EPS. The FAIL only occurs

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/15/23 09:49, Robin Dapp wrote: Hi, this patch changes the equality check for the reduc_strict_run-1 testcase from == to fabs () < EPS. The FAIL only occurs with _Float16 but I'd argue approximate equality is preferable for all float modes. Regards Robin gcc/testsuite/ChangeLog:

[PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread Robin Dapp via Gcc-patches
Hi, this patch changes the equality check for the reduc_strict_run-1 testcase from == to fabs () < EPS. The FAIL only occurs with _Float16 but I'd argue approximate equality is preferable for all float modes. Regards Robin gcc/testsuite/ChangeLog: *