Hi Robin: Share with you more context that I've discussed with Ju-Zhe, and look for comments from you :)
There is 3 different auto vectorization flavor: - VLA - VLS fixed-vlmax (Name TBD) - (Traditional) VLS I think I don't need to explain too much on VLA. So let we focus on second and third: VLS fixed-vlmax, that's something like -mriscv-vector-bits= or -msve-vector-bits, assume VLEN is a static length, and evaluate scalable vector mode as fixed length vector mode (e.g. evaluate (8x + 8) byte to 16 byte), so that stack allocation could be done by static instead computed by vlenb register, and vlvmax could be evaluate to a static value too, but the code generated by this mode is not portable, when you compile with -mriscv-vector-bits=128, then the code can't run on machine which VLEN is not exactly equal to 128. (Traditional) VLS, vectorized to something like int32x4_t, stack allocation can be determined in static too since the size is fixed, but size of vector register size is still a poly_int16 value (scalable vector), not evaluated to fixed length vector like VLS fixed-vlmax mode, this mode could be useful to handle those loop can't vectorized by VLA mode, or used by SLP vectorizor, and this mode is more portable than VLS fixed-vlmax mode since it only require VLEN is larger than specific length, rather than require must equal to specific length. On Thu, Apr 20, 2023 at 5:47 PM juzhe.zh...@rivai.ai <juzhe.zh...@rivai.ai> wrote: > > Ahhh. These compile options are not finalized. > I just ask kito provide me some compile option that I can specify LMUL && > auto-vectorization mode && vector-length (scalable or fixed-length) > in order to have chances test auto-vectorizaiton fully for example: fully > testing LMUL = 1/2/4/8 auto-vectorization (You can see the codes in rvv.exp). > Then, he let me add --param options. > > I can change compile option as you suggested. > > Thanks. > > > juzhe.zh...@rivai.ai > > From: Robin Dapp > Date: 2023-04-20 17:42 > To: juzhe.zh...@rivai.ai; kito.cheng > CC: gcc-patches; palmer; jeffreyalaw > Subject: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV > > Can you give more comments about Robin's opinion that he want to change into > > "fixed" vs "varying" or "fixed vector size" vs "dynamic vector size" ? > > It's not necessary to decide on this now as --params are not supposed > to be stable and can be changed quickly. I was just curious if this had > already been discussed or finalized elsewhere. > > Regards > Robin >