From: Kito Cheng <kito.cheng@gmail.com>
To: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
Cc: "pan2.li" <pan2.li@intel.com>,
gcc-patches <gcc-patches@gcc.gnu.org>,
"Kito.cheng" <kito.cheng@sifive.com>,
"yanzhang.wang" <yanzhang.wang@intel.com>
Subject: Re: [PATCH v1] RISC-V: Support RVV FP16 ZVFH Reduction floating-point intrinsic API
Date: Tue, 6 Jun 2023 09:32:12 +0800 [thread overview]
Message-ID: <CA+yXCZB6A_ejGi=cX_ZB8+BHZUfoEr6s+HoNhtHc2jDFDKRQyA@mail.gmail.com> (raw)
In-Reply-To: <60250B9FED9AB19E+2023060609104365666371@rivai.ai>
> diff --git a/gcc/config/riscv/vector-iterators.md b/gcc/config/riscv/vector-iterators.md
> index e4f2ba90799..c338e3c9003 100644
> --- a/gcc/config/riscv/vector-iterators.md
> +++ b/gcc/config/riscv/vector-iterators.md
> @@ -330,10 +330,18 @@ (define_mode_iterator VF_ZVE32 [
> ])
> (define_mode_iterator VWF [
> + (VNx1HF "TARGET_VECTOR_ELEN_FP_16 && TARGET_MIN_VLEN < 128")
> + (VNx2HF "TARGET_VECTOR_ELEN_FP_16")
> + (VNx4HF "TARGET_VECTOR_ELEN_FP_16")
> + (VNx8HF "TARGET_VECTOR_ELEN_FP_16")
> + (VNx16HF "TARGET_VECTOR_ELEN_FP_16")
> + (VNx32HF "TARGET_VECTOR_ELEN_FP_16 && TARGET_MIN_VLEN > 32")
> + (VNx64HF "TARGET_VECTOR_ELEN_FP_16 && TARGET_MIN_VLEN >= 128")
I am little concern about using TARGET_VECTOR_ELEN_FP_16 as predictor here,
zvfhmin also set TARGET_VECTOR_ELEN_FP_16 flag,
so it means zvfhmin also enabled reduction?
and also has the same concern for V and VF in the last patch[1] too.
[1] https://patchwork.sourceware.org/project/gcc/patch/20230605082043.1707158-1-pan2.li@intel.com/
Give a more practical example to explain my concern:
We've using V and VF iterators in autovec.md, and zvfhmin will set
MASK_VECTOR_ELEN_FP_16
which means zvfhmin WILL enable most autovec patterns with fp16,
that should not what we expected to do I think?
next prev parent reply other threads:[~2023-06-06 1:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 14:49 pan2.li
2023-06-06 1:10 ` juzhe.zhong
2023-06-06 1:32 ` Kito Cheng [this message]
2023-06-06 1:39 ` juzhe.zhong
2023-06-06 1:41 ` Li, Pan2
2023-06-06 1:41 ` juzhe.zhong
2023-06-06 1:48 ` Kito Cheng
2023-06-06 2:12 ` 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='CA+yXCZB6A_ejGi=cX_ZB8+BHZUfoEr6s+HoNhtHc2jDFDKRQyA@mail.gmail.com' \
--to=kito.cheng@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@sifive.com \
--cc=pan2.li@intel.com \
--cc=yanzhang.wang@intel.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).