public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Robin Dapp <rdapp.gcc@gmail.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	palmer <palmer@dabbelt.com>, Kito Cheng <kito.cheng@gmail.com>,
	"juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
Subject: Re: [PATCH] RISC-V: Add autovec FP unary operations.
Date: Wed, 14 Jun 2023 13:43:21 -0600	[thread overview]
Message-ID: <1377c200-9c30-0b7f-0893-0d7d976dfd43@gmail.com> (raw)
In-Reply-To: <490fd4af-75d2-de76-fa74-f9ebb478b8b8@gmail.com>



On 6/14/23 09:31, Robin Dapp wrote:
> Hi,
> 
> this patch adds floating-point autovec expanders for vfneg, vfabs as well as
> vfsqrt and the accompanying tests.  vfrsqrt7 will be added at a later time.
So with vrsqrt7 I think the question turns into will we be able to use 
it effectively.  With its limited initial accuracy, we'll be stuck with 
another round of Newton-Raphson or Goldschmidt, so we're not likely 
going to beat the latency of a standard vsqrt.  We can use it to improve 
throughput though since it does pipeline (using the fmacs of course, so 
there's a definite trade-off if the fmacs are already saturated).


> 
> Similary to the binop tests, there are flavors for zvfh now.  Prerequisites
> as before.
> 
> Regards
>   Robin
> 
> gcc/ChangeLog:
> 
> 	* config/riscv/autovec.md (<optab><mode>2): Add unop expanders.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/riscv/rvv/autovec/unop/abs-run.c: Add FP.
> 	* gcc.target/riscv/rvv/autovec/unop/abs-rv32gcv.c: Add FP.
> 	* gcc.target/riscv/rvv/autovec/unop/abs-rv64gcv.c: Add FP.
> 	* gcc.target/riscv/rvv/autovec/unop/abs-template.h: Add FP.
> 	* gcc.target/riscv/rvv/autovec/unop/vneg-run.c: Add FP.
> 	* gcc.target/riscv/rvv/autovec/unop/vneg-rv32gcv.c: Add FP.
> 	* gcc.target/riscv/rvv/autovec/unop/vneg-rv64gcv.c: Add FP.
> 	* gcc.target/riscv/rvv/autovec/unop/vneg-template.h: Add FP.
> 	* gcc.target/riscv/rvv/autovec/unop/abs-zvfh-run.c: New test.
> 	* gcc.target/riscv/rvv/autovec/unop/vfsqrt-run.c: New test.
> 	* gcc.target/riscv/rvv/autovec/unop/vfsqrt-rv32gcv.c: New test.
> 	* gcc.target/riscv/rvv/autovec/unop/vfsqrt-rv64gcv.c: New test.
> 	* gcc.target/riscv/rvv/autovec/unop/vfsqrt-template.h: New test.
> 	* gcc.target/riscv/rvv/autovec/unop/vfsqrt-zvfh-run.c: New test.
> 	* gcc.target/riscv/rvv/autovec/unop/vneg-zvfh-run.c: New test.
LGTM.  So if Juzhe is happy with it, then it's good to go once 
dependencies are resolved.

jeff


  reply	other threads:[~2023-06-14 19:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 15:31 Robin Dapp
2023-06-14 19:43 ` Jeff Law [this message]
2023-06-14 21:15   ` 钟居哲
2023-06-15  8:24     ` Robin Dapp
2023-06-15 14:33       ` Robin Dapp
2023-06-17  2:17     ` Jeff Law
     [not found]   ` <2023061505153418390417@rivai.ai>
2023-06-14 21:27     ` 钟居哲
2023-06-15  2:31 ` juzhe.zhong
2023-06-15 15:12 ` [PATCH v2] " Robin Dapp
2023-06-15 16:46   ` Michael Collison
2023-06-15 17:05   ` 钟居哲
2023-06-16 13:32   ` [PATCH v3] " Robin Dapp
     [not found]   ` <3D189BAB610F6C4E+160C6AB4-2BD8-4A9A-A1EC-5081D07AE627@rivai.ai>
2023-06-17  2:18     ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377c200-9c30-0b7f-0893-0d7d976dfd43@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=rdapp.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).