Skip to content

Commit 28f5d52

Browse files
committed
[NeoMathEngine] AVX512 alignment
Signed-off-by: Kirill Golikov <[email protected]>
1 parent 6d85c03 commit 28f5d52

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NeoMathEngine/src/CPU/CPUInfo.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ struct CCPUInfo final {
149149
#error "Platform isn't supported!"
150150
#endif // ERROR FINE_PLATFORM
151151
}
152+
if( HasAvx512And2Fma ) {
153+
floatAlignment = 16;
154+
}
152155

153156
return floatAlignment;
154157
#endif // !NEOML_USE_NEON

NeoMathEngine/src/CPU/x86/avx512/Avx512Functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace NeoML {
2424
namespace Avx512 {
2525

2626
// The minimum vector size recommended for using AVX512 vector functions
27-
static constexpr int VectorMathMinSize = 32;
27+
static constexpr int VectorMathMinSize = 16;
2828

2929
void dataCopy( float* dst, const float* src, int vectorSize );
3030

0 commit comments

Comments
 (0)