riscv-non-isa / rvv-intrinsic-doc

https://jira.riscv.org/browse/RVG-153
BSD 3-Clause "New" or "Revised" License
277 stars 88 forks source link

Constraint of vector types in Zve32* #299

Open jacquesguan opened 8 months ago

jacquesguan commented 8 months ago

In this doc: https://github.com/riscv-non-isa/rvv-intrinsic-doc/blob/main/doc/rvv-intrinsic-spec.adoc There is a constraint: Types with subscript "" is available when ELEN >= 64 (that is, unavailable under Zve32 and require at least Zve64x). 截屏2023-11-21 15 44 06

Why these vector types are not available for Zve32*?

topperc commented 8 months ago

This sentence from section 3.4.2 in the spec removes LMUL=1/8 for ELEN=32. "For standard vector extensions with ELEN=32, fractional LMULs of 1/2 and 1/4 must be supported. For standard vector extensions with ELEN=64, fractional LMULs of 1/2, 1/4, and 1/8 must be supported"

The other text around there explains the rest.

The summary is that there are no fractional LMULs with SEW==ELEN. And the fractional types that exist are the ones needed to be able to widen to LMUL==1 SEW==ELEN.

jacquesguan commented 8 months ago

This sentence from section 3.4.2 in the spec removes LMUL=1/8 for ELEN=32. "For standard vector extensions with ELEN=32, fractional LMULs of 1/2 and 1/4 must be supported. For standard vector extensions with ELEN=64, fractional LMULs of 1/2, 1/4, and 1/8 must be supported"

The other text around there explains the rest.

The summary is that there are no fractional LMULs with SEW==ELEN. And the fractional types that exist are the ones needed to be able to widen to LMUL==1 SEW==ELEN.

Thanks to response. So vfloat16mf4_t and vfloat32mf2_t should also be not available for Zve32f, but for Zve64f, are they available too?