Date
1 - 3 of 3
vwredsum
Earl Killian
If the vector operand to an integer vwredsum is long enough, 2*SEW will not be large enough to contain the result. I would interpret the spec to suggest that the low 2*SEW bits are written to the destination (there is not mention of saturation), but it seems like it deserves a mention, if only to encourage software to think about precision and vector length.
As a 2*SEW scalar from element 0 of vs1 is added to the sum of the various SEW elements in vs2, even a vector of length 1 can cause overflow.
On Fri, Sep 17, 2021 at 12:43 PM Earl Killian <earl.killian@...> wrote:
If the vector operand to an integer vwredsum is long enough, 2*SEW will not be large enough to contain the result. I would interpret the spec to suggest that the low 2*SEW bits are written to the destination (there is not mention of saturation), but it seems like it deserves a mention, if only to encourage software to think about precision and vector length.
Added explicit statement to spec for this case. There was a wrap-around
statement for single-width but not for widening reductions.
Krste
| elements in vs2, even a vector of length 1 can cause overflow.
| On Fri, Sep 17, 2021 at 12:43 PM Earl Killian <earl.killian@...>
| wrote:
| If the vector operand to an integer vwredsum is long enough, 2*SEW will
| not be large enough to contain the result. I would interpret the spec to
| suggest that the low 2*SEW bits are written to the destination (there is
| not mention of saturation), but it seems like it deserves a mention, if
| only to encourage software to think about precision and vector length.
|
statement for single-width but not for widening reductions.
Krste
| As a 2*SEW scalar from element 0 of vs1 is added to the sum of the various SEWOn Fri, 17 Sep 2021 14:22:07 +1200, "Bruce Hoult" <bruce@...> said:
| elements in vs2, even a vector of length 1 can cause overflow.
| On Fri, Sep 17, 2021 at 12:43 PM Earl Killian <earl.killian@...>
| wrote:
| If the vector operand to an integer vwredsum is long enough, 2*SEW will
| not be large enough to contain the result. I would interpret the spec to
| suggest that the low 2*SEW bits are written to the destination (there is
| not mention of saturation), but it seems like it deserves a mention, if
| only to encourage software to think about precision and vector length.
|