Skip to content

Commit

Permalink
[NeoMathEngine] AVX512 alignment
Browse files Browse the repository at this point in the history
Signed-off-by: Kirill Golikov <[email protected]>
  • Loading branch information
favorart committed Jan 18, 2024
1 parent 6d85c03 commit 28f5d52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NeoMathEngine/src/CPU/CPUInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ struct CCPUInfo final {
#error "Platform isn't supported!"
#endif // ERROR FINE_PLATFORM
}
if( HasAvx512And2Fma ) {
floatAlignment = 16;
}

return floatAlignment;
#endif // !NEOML_USE_NEON
Expand Down
2 changes: 1 addition & 1 deletion NeoMathEngine/src/CPU/x86/avx512/Avx512Functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace NeoML {
namespace Avx512 {

// The minimum vector size recommended for using AVX512 vector functions
static constexpr int VectorMathMinSize = 32;
static constexpr int VectorMathMinSize = 16;

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

Expand Down

0 comments on commit 28f5d52

Please sign in to comment.