gnuradio / volk

The Vector Optimized Library of Kernels
http://libvolk.org
GNU Lesser General Public License v3.0
557 stars 202 forks source link

Decrease the range for signed 16-bit integer testing #706

Closed argilo closed 12 months ago

argilo commented 1 year ago

Mitigates #676.

The qa_volk_16ic_x2_dot_prod_16ic test is now the most frequent source of CI failures which does not already have an open pull request. The volk_16ic_x2_dot_prod_16ic kernel was added in #77, and because it does not handle integer overflow consistently, the test suite was modified at that time to limit signed 16-bit integer testing to the range -7 .. +7. Unfortunately, this is not sufficient to prevent overflows in the qa_volk_16ic_x2_dot_prod_16ic.

It would be quite a bit of work to rewrite the volk_16ic_x2_dot_prod_16ic kernel to have consistent overflow handling between the protokernels, so I'm proposing to decrease the signed integer range slightly (to -6 .. +6). This does not remove test failures entirely, but reduces the failure rate by about 50x.

argilo commented 12 months ago

Even though, this affects other kernels as well.

That's correct; this will slightly reduce the effectiveness of testing for all kernels with 16i inputs, but I think it's better than having a flaky test which causes CI to be ignored. Hopefully we can come up with a proper fix for #676, after which the full range of 16i values can be tested.