riscv-non-isa/rvv-intrinsic-doc

Is it possible to perform grouped sums in a vector?

Opened this issue · 1 comments

Hi,
The vredsum instruction reduces all the data in the vector. Can it be grouped and reduced?
For example, for the input [1,2,3,4,5,6,7,8], the output is [10,26]. Every 4 numbers are grouped and added, and the output is still a vector.

There are no RVV1.0 instructions that do this, so no. From what I understand, the intended way to do operations like this is to do a 4 segment load (e.g. vluxseg4ei32.v / __riscv_vluxseg4ei32_v_i32m1x4) and do three vadd.vvs.