public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
To: "Robin Dapp" <rdapp.gcc@gmail.com>,
	 gcc-patches <gcc-patches@gcc.gnu.org>
Cc: "Robin Dapp" <rdapp.gcc@gmail.com>,
	 Kito.cheng <kito.cheng@sifive.com>,
	 palmer <palmer@rivosinc.com>,
	 jeffreyalaw <jeffreyalaw@gmail.com>
Subject: Re: Re: [PATCH] RISC-V: Fix V_WHOLE && V_FRACT iterator requirement
Date: Mon, 12 Jun 2023 17:58:28 +0800	[thread overview]
Message-ID: <954A2C66661D7FB1+202306121758276127389@rivai.ai> (raw)
In-Reply-To: <6d08e70d-dc29-e47c-be43-ba48cfeddeee@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]

I'd like you to defer to you commit my patch with your test (Jeff has approved my patch, just feel free to commit).

Here is the description:
We have 3 configuration for "-march"
1. zve32*  (TARGET_MIN_VLEN == 32), the LMUL = 1 mode will be VNx4QI, VNx2HI, VNx1SI
2. zve64*  (TARGET_MIN_VLEN == 64), the LMUL = 1 mode will be VNx8QI, VNx4HI, VNx2SI
3. zve64*_zvl128b  (TARGET_MIN_VLEN >= 128), the LMUL = 1 mode will be VNx16QI, VNx8HI, VNx4SI

We dynamically adjust BYTES_PER_VECTOR according to TARGET_MIN_VLEN.
For TARGET_MIN_VLEN = 32 (chunk=32), the LMUL = 1 size = (4,4) bytes.
For TARGET_MIN_VLEN = 64 (chunk=64), the LMUL = 1 size = (8,8) bytes.
For TARGET_MIN_VLEN >= 128 (chunk=128), the LMUL = 1 size = (16*n,16*n) bytes.
I have explained it many times.
https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614935.html 
https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612574.html 




juzhe.zhong@rivai.ai
 
From: Robin Dapp
Date: 2023-06-12 17:51
To: 钟居哲; gcc-patches
CC: rdapp.gcc; kito.cheng; palmer; Jeff Law
Subject: Re: [PATCH] RISC-V: Fix V_WHOLE && V_FRACT iterator requirement
> +  (VNx16QI "TARGET_MIN_VLEN <= 128")
> +  (VNx32QI "TARGET_MIN_VLEN <= 256")
> +  (VNx64QI "TARGET_MIN_VLEN >= 64 && TARGET_MIN_VLEN <= 512")
> +  (VNx128QI "TARGET_MIN_VLEN >= 128 && TARGET_MIN_VLEN <= 1024")
> 
> This not correct, we always use VNx16QI as LMUL = m1 for min_vlen >= 128.
> Requirement of TARGET_MIN_VLEN <= 128 is incorrect for VNx16QI.
> VNx32QI,...etc likewise.
 
Please elaborate.  What happens with a VNx16QI on a target with
min_vlen == 256?  Is it a full 256-bit vector with only the first half
populated?  If so, this need documentation either here or somewhere
else (but with a reference here).
 
Either you can pick my testcase and amend your patch (plus
streamline formatting as well adding a proper comment) or I change
mine.  Your call.
 
Regards
Robin
 

  reply	other threads:[~2023-06-12  9:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 14:32 juzhe.zhong
2023-06-09 14:37 ` Robin Dapp
2023-06-09 14:40   ` 钟居哲
2023-06-09 14:42     ` Robin Dapp
2023-06-09 14:45   ` Jeff Law
2023-06-09 23:50   ` 钟居哲
2023-06-12  9:51     ` Robin Dapp
2023-06-12  9:58       ` juzhe.zhong [this message]
2023-06-12 12:27         ` Kito Cheng
2023-06-12 19:53         ` Jeff Law
2023-06-13  1:28           ` Li, Pan2

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=954A2C66661D7FB1+202306121758276127389@rivai.ai \
    --to=juzhe.zhong@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=palmer@rivosinc.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).