On 4/20/23 05:08, Richard Biener wrote:
On Wed, Apr 19, 2023 at 6:38 PM <juzhe.zh...@rivai.ai> wrote:
From: Ju-Zhe Zhong <juzhe.zh...@rivai.ai>
This patch is adding 2 compile option for RVV auto-vectorization.
1. -param=riscv-autovec-preference=
This option is to specify the auto-vectorization approach for RVV.
Currently, we only support scalable and fixed-vlmax.
- scalable means VLA auto-vectorization. The vector-length to compiler is
unknown and runtime invariant. Such approach can allow us compile the
code
run on any vector-length RVV CPU.
- fixed-vlmax means the compile known the RVV CPU vector-length, compile
option
in fixed-length VLS auto-vectorization. Meaning if we specify
vector-length=512.
The execution file can only run on vector-length = 512 RVV CPU.
- TODO: we may need to support min-length VLS auto-vectorization, means
the execution
file can run on larger length RVV CPU.
Just as a generic comment - if the option should be exposed to users
rather than just used
for testsuite or development purposes it should eventually become a
-mautovec-preference=
flag (no need to prefix with riscv).
I would expect that we don't want users twiddling the autovectorization
style in the long term. I do support having the param so that we can
can do A/B experiments across the styles to identify gaps.
jeff