You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The following SFPU llk, implemented using sfpi, does not work:
template <bool APPROXIMATION_MODE, int ITERATIONS = 8>
inline void calculate_left_shift(const uint shift_amt) {
#pragma GCC unroll 0
for (int d = 0; d < ITERATIONS; d++) {
vInt val = dst_reg[0];
val = val << shift_amt;
dst_reg[0] = val;
dst_reg++;
}
}
But this one does, and it uses SFPU instructions directly:
template <bool APPROXIMATION_MODE, int ITERATIONS = 8>
inline void calculate_left_shift(const uint shift_amt) {
#pragma GCC unroll 0
for (int d = 0; d < ITERATIONS; d++) {
TTI_SFPLOAD(0,4,3,0);
TT_SFPSHFT(shift_amt,0,0,1);
TTI_SFPSTORE(0,4,3,0);
dst_reg++;
}
}
Both simply load 32 bit values from Dest, left shift by shift_amt, and store back. Sfpi version does not work when bit 31 (MSB) has to change from 0->1 or 1->0 as a result of shift operation.
See this issue for more details: #13415
Describe the bug
The following SFPU llk, implemented using sfpi, does not work:
But this one does, and it uses SFPU instructions directly:
Both simply load 32 bit values from Dest, left shift by
shift_amt
, and store back. Sfpi version does not work when bit 31 (MSB) has to change from 0->1 or 1->0 as a result of shift operation.See this issue for more details: #13415
To Reproduce
Use this test:
Expected behavior
Sfpi version of the LLK should pass the test as well.
The text was updated successfully, but these errors were encountered: