Comments (3)
I don't have an opinion on which test framework to use, but I'll list out some things that could be improved by moving away from one-size-fits-all testing:
- No more puppets!
- Many kernels have fixed-length inputs (e.g.
sum_of_poly
) or outputs (e.g.dot_prod
,index_max
,stddev
) but the current system always supplies variable-length buffers. This makes it difficult to catch buffer overruns on the fixed-length buffers. - All buffers are padded by 5 (
vlen_twiddle
), apparently to help catch out-of-bounds writes and prevent fixed-length buffers from becoming too short (see above). But this prevents tools like ASAN and valgrind from catching buffer overruns, including out-of-bounds reads. - Some kernels (e.g.
index_min
,index_max
) only make sense for vector lengths >= 1, so length 0 should be disallowed for them. - The current tolerance options are "relative" (to the output magnitude) and "absolute". Neither of these makes much sense for kernels like
dot_prod
, where the error magnitude is proportional to the vector length, and is independent of the output magnitude. (If the dot product happens to be close to zero, the relative error becomes large.) - Kernels with rounded integer output are forced to use tolerance 1, even though very few of the floating point values have a fractional part near 0.5 (e.g. #647).
- All floating-point kernels are tested with uniformly distributed inputs in the range -1 .. +1. For some kernels (e.g.
pow
,sqrt
) such inputs are inappropriate, resulting in bugs like #649. - Almost all kernels are tested with the fixed scalar value 327.0, which may not be appropriate (e.g. #381).
- Special cases (e.g. 0.0) are untested, allowing bugs like #622, #701, and #730 to slip through.
- The
32fc_index_*
kernels can have multiple possible correct answers, so the test framework should allow that. See #700 for more details.
from volk.
I did some tests with gtest:
https://github.com/jdemel/volk/tree/newtest
At the moment, there are quite a few areas where this can be improved.
- Integration into ctest
- Output prints should go into the log instead of the default output
- Possible copypasta code should be reduced.
Thus, this implementation is a proof of concept and open for discussion.
from volk.
Another problematic case:
volk_32f_s32f_32f_fm_detect_32f
andvolk_32f_s32f_s32f_mod_range_32f
both involve phase angle calculations, and tolerance checks fail if the angles being compared are -pi+epsilon and +pi-epsilon. (The difference in angle is very small, but the difference in absolute value is large.)
from volk.
Related Issues (20)
- volk_8ic_x2_multiply_conjugate_16ic is not documented
- qa_volk_32fc_index_* are flaky HOT 1
- Various kernels with 16i inputs do not handle integer overflow consistently HOT 2
- AppVeyor builds sometimes fail HOT 1
- Add i386 to CI HOT 4
- VOLK_VERSION is too hard to actually use. HOT 9
- volk CMakeLists.txt uses CMAKE_INSTALL_LIBDIR without including the 'GNUInstallDirs' module HOT 6
- v3.1.0 volk_32fc_s32f_atan2_32f.h avx2 and avx2_fma kernels return NaN for an input element 0+0j HOT 1
- Remove LV_HAVE_LIB_SIMDMATH?
- volk_8u_conv_k7_r2puppet is broken
- (RHEL/Rocky Linux) cpu_features/CMakeLists.txt not found HOT 2
- lto-type-mismatch building HEAD
- volk 3.1.1 regression test failure HOT 22
- cannot built 3.1.1 from release tarball HOT 8
- release script should switch to bash syntax completely HOT 3
- document cpu_features external dependency preference.
- Automate docs generation and release HOT 1
- VOLK with Python HOT 1
- Warnings with Python 3.12 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from volk.