From: <juzhe.zhong@rivai.ai>
To: "Michael Collison" <collison@rivosinc.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Cc: kito.cheng <kito.cheng@sifive.com>,
kito.cheng <kito.cheng@gmail.com>,
richard.sandiford <richard.sandiford@arm.com>,
richard.guenther <richard.guenther@gmail.com>
Subject: Re: Re: [PATCH] vect: Check that vector factor is a compile-time constant
Date: Thu, 23 Feb 2023 07:43:02 +0800 [thread overview]
Message-ID: <2A48F0392ABDB9DE+202302230743020949652@rivai.ai> (raw)
In-Reply-To: <bcba0435-553a-19d1-721b-3ae5862abb87@rivosinc.com>
[-- Attachment #1: Type: text/plain, Size: 2798 bytes --]
Currently, upstream GCC is not ready to support auto-vec.
I am building the basic infrastructure of RVV and need more testing.
I can't support auto-vec now since it depends on the infrastructure tha I am building.
I have open source "rvv-next" in RISC-V foundation repo which fully support intrinsic && auto-vec.
You can either wait for the upstream GCC or develop base rvv-next.
juzhe.zhong@rivai.ai
From: Michael Collison
Date: 2023-02-23 01:54
To: juzhe.zhong; gcc-patches
CC: kito.cheng; kito.cheng; richard.sandiford; richard.guenther
Subject: Re: [PATCH] vect: Check that vector factor is a compile-time constant
Juzhe,
I disagree with this comment. There are many stakeholders for autovectorization and waiting until GCC 14 is not a viable solution for us as well as other stakeholders ready to begin work on autovectorization.
As we discussed I have been moving forward with patches for autovectorization and am preparing to send them to gcc-patches. This assert is preventing code from compiling and needs to be addressed.
If you have a solution in either the RISCV backend or in this file can you please present it?
On 2/22/23 10:27, juzhe.zhong@rivai.ai wrote:
> gcc/
>
> * tree-vect-loop-manip.cc (vect_do_peeling): Verify
> that vectorization factor is a compile-time constant.
>
> ---
> gcc/tree-vect-loop-manip.cc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
> index 6aa3d2ed0bf..1ad1961c788 100644
> --- a/gcc/tree-vect-loop-manip.cc
> +++ b/gcc/tree-vect-loop-manip.cc
> @@ -2930,7 +2930,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree
> niters, tree nitersm1,
> niters = vect_build_loop_niters (loop_vinfo, &new_var_p);
> /* It's guaranteed that vector loop bound before vectorization is at
> least VF, so set range information for newly generated var. */
> - if (new_var_p)
> + if (new_var_p && vf.is_constant ())
> {
> value_range vr (type,
> wi::to_wide (build_int_cst (type, vf)),
I don't think we need to apply this limit in case of RVV auto-vectorization.
I have talked with Kito and I have a full solution of supporting RVV solution.
We are going to support RVV auto-vectorization in 3 configuration according to RVV ISA spec:
1. -march=zve32* support QI and HI auto-vectorization by VNx4QImode and VNx2HImode
2. -march=zve64* support QI and HI and SI auto-vectorization by VNx8QImode and VNx4HImode and VNx2SImode
3. -march=v* support QI and HI and SI and DI auto-vectorization by VNx16QImode and VNx8HImode and VNx4SImode and VNx2DImode
I will support them in GCC 14. Current loop vectorizer works well for us no need to fix it.
Thanks.
juzhe.zhong@rivai.ai
next prev parent reply other threads:[~2023-02-22 23:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 15:27 juzhe.zhong
2023-02-22 17:54 ` Michael Collison
2023-02-22 23:43 ` juzhe.zhong [this message]
2023-02-22 23:47 ` juzhe.zhong
2023-02-23 4:01 ` Jeff Law
2023-02-23 4:25 ` juzhe.zhong
2023-02-23 4:50 ` Michael Collison
2023-02-24 3:34 ` Jeff Law
2023-02-24 4:04 ` Kito Cheng
2023-03-14 17:48 ` Jeff Law
2023-03-17 16:57 ` Palmer Dabbelt
2023-03-17 16:57 ` Palmer Dabbelt
2023-03-21 2:02 ` juzhe.zhong
2023-03-23 23:18 ` Jeff Law
2023-03-24 2:28 ` Palmer Dabbelt
2023-03-25 22:45 ` 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=2A48F0392ABDB9DE+202302230743020949652@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=collison@rivosinc.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kito.cheng@gmail.com \
--cc=kito.cheng@sifive.com \
--cc=richard.guenther@gmail.com \
--cc=richard.sandiford@arm.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).