Repository navigation
core:test Expand hal_intrin tests to support SIMD256 - #12056
Conversation
3f3c3ff to
b5008af
Compare
| case 16: return v_uint8x32(swap); | ||
| } | ||
| if (imm == 0) return a; | ||
| if (imm == 32) return b; |
There was a problem hiding this comment.
These two "if" lines can be moved before "swap" variable declaration.
Similar note for code below (move 1-2 lines).
| CV_INTRIN_DEFINE_WIDE_INTRIN_ALL_TYPES(v256) | ||
| CV_INTRIN_DEFINE_WIDE_INTRIN(double, v_float64, f64, v256, load) | ||
| inline void vx_cleanup() { v256_cleanup(); } | ||
| #elif CV_SIMD128 |
There was a problem hiding this comment.
-#elif CV_SIMD128
+#elif CV_SIMD128 || CV_SIMD128_CPPRight (similar to line 261).
We need this.
Not all covered by tests, so we should have ability to disable using of H/W intrinsics and check our "vectorized" code via RAW C++ implementation (slow, but we checking correctness in this mode)
There was a problem hiding this comment.
IMO, we only need to fallback into dummy types and dummy intrinsics just for template programming and also dispatching simd128 intrin tests.
However we need this for now to avoid compiling errors for non-simd optimizations.
| namespace opencv_test { namespace hal { | ||
| using namespace CV_CPU_OPTIMIZATION_NAMESPACE; | ||
|
|
||
| TEST(hal_intrin256, uint8x32) |
There was a problem hiding this comment.
It is "dead" test for non-AVX2 machines - any code from this file should not be called there.
Test declaration (via TEST()) and dispatching should be done outside of this function. See "FP16" test:
CV_CPU_CALL_FP16_(test_hal_intrin_float16, ());
throw SkipTestException("Unsupported hardware: FP16 is not available");
There was a problem hiding this comment.
Accidentally rebase removed the last changes, I think its fine now .. thank you once again
be2d725 to
850df55
Compare
9788b77 to
4825ef1
Compare
4825ef1 to
6499263
Compare
Expand hal_intrin tests to support SIMD256