Skip to content

Commit 91b5f68

Browse files
committed
Add unittest for AVX512VNNI
Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent 89c6fda commit 91b5f68

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

unittest/intsimdmatrix_test.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,18 @@ TEST_F(IntSimdMatrixTest, AVX2) {
135135
#endif
136136
}
137137

138+
// Tests that the AVX512VNNI implementation gets the same result as the vanilla.
139+
TEST_F(IntSimdMatrixTest, AVX512VNNI) {
140+
#if defined(HAVE_AVX512VNNI)
141+
if (!SIMDDetect::IsAVX512VNNIAvailable()) {
142+
GTEST_LOG_(INFO) << "No AVX512VNNI found! Not tested!";
143+
GTEST_SKIP();
144+
}
145+
ExpectEqualResults(IntSimdMatrix::intSimdMatrixAVX512VNNI);
146+
#else
147+
GTEST_LOG_(INFO) << "AVX512VNNI unsupported! Not tested!";
148+
GTEST_SKIP();
149+
#endif
150+
}
151+
138152
} // namespace tesseract

0 commit comments

Comments
 (0)