Discussion about this post

User's avatar
camel-cdr's avatar

> Our code heavily relies on vsetvl* instructions setting vl to VLMAX when avl is greater than or equal to VLMAX. Although this seems to be true on our target, this is actually not mandated by RVV 1.0. This makes this code quite brittle and should be addressed.

This is a single additional min instruction: vsetvli(min(avl, vlmax))

Or you can just always use VLMAX, which works better depends on the context.

> Using a VLEN specific approach is somehow cheating

I think the best approach is to have a general solution, with specialization where beneficial. Branching on VLEN should be extremely cheap, because it's always predicted.

Expand full comment
1 more comment...

No posts