RE: [PATCH v1] RISC-V: Remove FP run test for ceil.

2023-09-23 Thread Li, Pan2
Sure, will re-visit this part later.

Pan

-Original Message-
From: Kito Cheng  
Sent: Saturday, September 23, 2023 3:47 PM
To: Li, Pan2 
Cc: 钟居哲 ; gcc-patches ; Wang, 
Yanzhang 
Subject: Re: [PATCH v1] RISC-V: Remove FP run test for ceil.

I guess it just needs more checks than `target { riscv_vector }`,
maybe something like `target { riscv_vector_zvfh }`, but anyway I am
fine to drop this for now.

On Sat, Sep 23, 2023 at 2:11 AM Li, Pan2  wrote:
>
> Committed, thanks Juzhe.
>
>
>
> Pan
>
>
>
> From: 钟居哲 
> Sent: Saturday, September 23, 2023 9:07 AM
> To: Li, Pan2 ; gcc-patches 
> Cc: Li, Pan2 ; Wang, Yanzhang ; 
> kito.cheng 
> Subject: Re: [PATCH v1] RISC-V: Remove FP run test for ceil.
>
>
>
> Ok
>
>
>
> 
>
> juzhe.zh...@rivai.ai
>
>
>
> From: pan2.li
>
> Date: 2023-09-23 09:06
>
> To: gcc-patches
>
> CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng
>
> Subject: [PATCH v1] RISC-V: Remove FP run test for ceil.
>
> From: Pan Li 
>
>
>
> FP16 is not well reconciled when linking.
>
>
>
> gcc/testsuite/ChangeLog:
>
>
>
> * gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c: Remove.
>
>
>
> Signed-off-by: Pan Li 
>
> ---
>
> .../riscv/rvv/autovec/unop/math-ceil-run-0.c  | 39 ---
>
> 1 file changed, 39 deletions(-)
>
> delete mode 100644 
> gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
>
>
>
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c 
> b/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
>
> deleted file mode 100644
>
> index 600c161159d..000
>
> --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
>
> +++ /dev/null
>
> @@ -1,39 +0,0 @@
>
> -/* { dg-do run { target { riscv_vector } } } */
>
> -/* { dg-additional-options "-std=c2x -O3 -ftree-vectorize 
> -fno-vect-cost-model -ffast-math" } */
>
> -
>
> -#include "test-math.h"
>
> -
>
> -#define ARRAY_SIZE 128
>
> -
>
> -_Float16 in[ARRAY_SIZE];
>
> -_Float16 out[ARRAY_SIZE];
>
> -_Float16 ref[ARRAY_SIZE];
>
> -
>
> -TEST_UNARY_CALL (_Float16, __builtin_ceilf16)
>
> -TEST_ASSERT (_Float16)
>
> -
>
> -TEST_INIT (_Float16, 1.2, 2.0, 1)
>
> -TEST_INIT (_Float16, -1.2, -1.0, 2)
>
> -TEST_INIT (_Float16, 3.0, 3.0, 3)
>
> -TEST_INIT (_Float16, 1023.5, 1024.0, 4)
>
> -TEST_INIT (_Float16, 1025.0, 1025.0, 5)
>
> -TEST_INIT (_Float16, 0.0, 0.0, 6)
>
> -TEST_INIT (_Float16, -0.0, -0.0, 7)
>
> -TEST_INIT (_Float16, -1023.5, -1023.0, 8)
>
> -TEST_INIT (_Float16, -1024.0, -1024.0, 9)
>
> -
>
> -int
>
> -main ()
>
> -{
>
> -  RUN_TEST (_Float16, 1, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 2, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 3, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 4, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 5, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 6, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 7, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 8, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 9, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -
>
> -  return 0;
>
> -}
>
> --
>
> 2.34.1
>
>
>
>


Re: [PATCH v1] RISC-V: Remove FP run test for ceil.

2023-09-23 Thread Kito Cheng
I guess it just needs more checks than `target { riscv_vector }`,
maybe something like `target { riscv_vector_zvfh }`, but anyway I am
fine to drop this for now.

On Sat, Sep 23, 2023 at 2:11 AM Li, Pan2  wrote:
>
> Committed, thanks Juzhe.
>
>
>
> Pan
>
>
>
> From: 钟居哲 
> Sent: Saturday, September 23, 2023 9:07 AM
> To: Li, Pan2 ; gcc-patches 
> Cc: Li, Pan2 ; Wang, Yanzhang ; 
> kito.cheng 
> Subject: Re: [PATCH v1] RISC-V: Remove FP run test for ceil.
>
>
>
> Ok
>
>
>
> 
>
> juzhe.zh...@rivai.ai
>
>
>
> From: pan2.li
>
> Date: 2023-09-23 09:06
>
> To: gcc-patches
>
> CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng
>
> Subject: [PATCH v1] RISC-V: Remove FP run test for ceil.
>
> From: Pan Li 
>
>
>
> FP16 is not well reconciled when linking.
>
>
>
> gcc/testsuite/ChangeLog:
>
>
>
> * gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c: Remove.
>
>
>
> Signed-off-by: Pan Li 
>
> ---
>
> .../riscv/rvv/autovec/unop/math-ceil-run-0.c  | 39 ---
>
> 1 file changed, 39 deletions(-)
>
> delete mode 100644 
> gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
>
>
>
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c 
> b/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
>
> deleted file mode 100644
>
> index 600c161159d..000
>
> --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
>
> +++ /dev/null
>
> @@ -1,39 +0,0 @@
>
> -/* { dg-do run { target { riscv_vector } } } */
>
> -/* { dg-additional-options "-std=c2x -O3 -ftree-vectorize 
> -fno-vect-cost-model -ffast-math" } */
>
> -
>
> -#include "test-math.h"
>
> -
>
> -#define ARRAY_SIZE 128
>
> -
>
> -_Float16 in[ARRAY_SIZE];
>
> -_Float16 out[ARRAY_SIZE];
>
> -_Float16 ref[ARRAY_SIZE];
>
> -
>
> -TEST_UNARY_CALL (_Float16, __builtin_ceilf16)
>
> -TEST_ASSERT (_Float16)
>
> -
>
> -TEST_INIT (_Float16, 1.2, 2.0, 1)
>
> -TEST_INIT (_Float16, -1.2, -1.0, 2)
>
> -TEST_INIT (_Float16, 3.0, 3.0, 3)
>
> -TEST_INIT (_Float16, 1023.5, 1024.0, 4)
>
> -TEST_INIT (_Float16, 1025.0, 1025.0, 5)
>
> -TEST_INIT (_Float16, 0.0, 0.0, 6)
>
> -TEST_INIT (_Float16, -0.0, -0.0, 7)
>
> -TEST_INIT (_Float16, -1023.5, -1023.0, 8)
>
> -TEST_INIT (_Float16, -1024.0, -1024.0, 9)
>
> -
>
> -int
>
> -main ()
>
> -{
>
> -  RUN_TEST (_Float16, 1, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 2, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 3, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 4, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 5, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 6, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 7, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 8, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -  RUN_TEST (_Float16, 9, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
>
> -
>
> -  return 0;
>
> -}
>
> --
>
> 2.34.1
>
>
>
>


RE: [PATCH v1] RISC-V: Remove FP run test for ceil.

2023-09-22 Thread Li, Pan2
Committed, thanks Juzhe.

Pan

From: 钟居哲 
Sent: Saturday, September 23, 2023 9:07 AM
To: Li, Pan2 ; gcc-patches 
Cc: Li, Pan2 ; Wang, Yanzhang ; 
kito.cheng 
Subject: Re: [PATCH v1] RISC-V: Remove FP run test for ceil.

Ok


juzhe.zh...@rivai.ai<mailto:juzhe.zh...@rivai.ai>

From: pan2.li<mailto:pan2...@intel.com>
Date: 2023-09-23 09:06
To: gcc-patches<mailto:gcc-patches@gcc.gnu.org>
CC: juzhe.zhong<mailto:juzhe.zh...@rivai.ai>; 
pan2.li<mailto:pan2...@intel.com>; 
yanzhang.wang<mailto:yanzhang.w...@intel.com>; 
kito.cheng<mailto:kito.ch...@gmail.com>
Subject: [PATCH v1] RISC-V: Remove FP run test for ceil.
From: Pan Li mailto:pan2...@intel.com>>

FP16 is not well reconciled when linking.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c: Remove.

Signed-off-by: Pan Li mailto:pan2...@intel.com>>
---
.../riscv/rvv/autovec/unop/math-ceil-run-0.c  | 39 ---
1 file changed, 39 deletions(-)
delete mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
deleted file mode 100644
index 600c161159d..000
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* { dg-do run { target { riscv_vector } } } */
-/* { dg-additional-options "-std=c2x -O3 -ftree-vectorize -fno-vect-cost-model 
-ffast-math" } */
-
-#include "test-math.h"
-
-#define ARRAY_SIZE 128
-
-_Float16 in[ARRAY_SIZE];
-_Float16 out[ARRAY_SIZE];
-_Float16 ref[ARRAY_SIZE];
-
-TEST_UNARY_CALL (_Float16, __builtin_ceilf16)
-TEST_ASSERT (_Float16)
-
-TEST_INIT (_Float16, 1.2, 2.0, 1)
-TEST_INIT (_Float16, -1.2, -1.0, 2)
-TEST_INIT (_Float16, 3.0, 3.0, 3)
-TEST_INIT (_Float16, 1023.5, 1024.0, 4)
-TEST_INIT (_Float16, 1025.0, 1025.0, 5)
-TEST_INIT (_Float16, 0.0, 0.0, 6)
-TEST_INIT (_Float16, -0.0, -0.0, 7)
-TEST_INIT (_Float16, -1023.5, -1023.0, 8)
-TEST_INIT (_Float16, -1024.0, -1024.0, 9)
-
-int
-main ()
-{
-  RUN_TEST (_Float16, 1, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 2, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 3, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 4, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 5, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 6, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 7, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 8, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 9, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-
-  return 0;
-}
--
2.34.1




Re: [PATCH v1] RISC-V: Remove FP run test for ceil.

2023-09-22 Thread 钟居哲
Ok



juzhe.zh...@rivai.ai
 
From: pan2.li
Date: 2023-09-23 09:06
To: gcc-patches
CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng
Subject: [PATCH v1] RISC-V: Remove FP run test for ceil.
From: Pan Li 
 
FP16 is not well reconciled when linking.
 
gcc/testsuite/ChangeLog:
 
* gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c: Remove.
 
Signed-off-by: Pan Li 
---
.../riscv/rvv/autovec/unop/math-ceil-run-0.c  | 39 ---
1 file changed, 39 deletions(-)
delete mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
 
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
deleted file mode 100644
index 600c161159d..000
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* { dg-do run { target { riscv_vector } } } */
-/* { dg-additional-options "-std=c2x -O3 -ftree-vectorize -fno-vect-cost-model 
-ffast-math" } */
-
-#include "test-math.h"
-
-#define ARRAY_SIZE 128
-
-_Float16 in[ARRAY_SIZE];
-_Float16 out[ARRAY_SIZE];
-_Float16 ref[ARRAY_SIZE];
-
-TEST_UNARY_CALL (_Float16, __builtin_ceilf16)
-TEST_ASSERT (_Float16)
-
-TEST_INIT (_Float16, 1.2, 2.0, 1)
-TEST_INIT (_Float16, -1.2, -1.0, 2)
-TEST_INIT (_Float16, 3.0, 3.0, 3)
-TEST_INIT (_Float16, 1023.5, 1024.0, 4)
-TEST_INIT (_Float16, 1025.0, 1025.0, 5)
-TEST_INIT (_Float16, 0.0, 0.0, 6)
-TEST_INIT (_Float16, -0.0, -0.0, 7)
-TEST_INIT (_Float16, -1023.5, -1023.0, 8)
-TEST_INIT (_Float16, -1024.0, -1024.0, 9)
-
-int
-main ()
-{
-  RUN_TEST (_Float16, 1, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 2, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 3, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 4, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 5, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 6, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 7, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 8, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-  RUN_TEST (_Float16, 9, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
-
-  return 0;
-}
-- 
2.34.1