diff --git a/projects/clr/rocclr/utils/flags.hpp b/projects/clr/rocclr/utils/flags.hpp index a5d849cc22..5c7ff852a0 100644 --- a/projects/clr/rocclr/utils/flags.hpp +++ b/projects/clr/rocclr/utils/flags.hpp @@ -40,7 +40,7 @@ debug(size_t, CPU_MEMORY_GUARD_PAGE_SIZE, 64, \ "Size in KB of CPU memory guard page") \ debug(size_t, CPU_MEMORY_ALIGNMENT_SIZE, 256, \ "Size in bytes for the default alignment for guarded memory on CPU") \ -debug(size_t, PARAMETERS_MIN_ALIGNMENT, 16, \ +debug(size_t, PARAMETERS_MIN_ALIGNMENT, NATIVE_ALIGNMENT_SIZE, \ "Minimum alignment required for the abstract parameters stack") \ debug(size_t, MEMOBJ_BASE_ADDR_ALIGN, 4*Ki, \ "Alignment of the base address of any allocate memory object") \ diff --git a/projects/clr/rocclr/utils/macros.hpp b/projects/clr/rocclr/utils/macros.hpp index aaf7e7bae0..8b65a2f16f 100644 --- a/projects/clr/rocclr/utils/macros.hpp +++ b/projects/clr/rocclr/utils/macros.hpp @@ -126,6 +126,14 @@ #define IS_WINDOWS false #endif +#if defined(__AVX512F__) +#define NATIVE_ALIGNMENT_SIZE 64 +#elif defined(__AVX__) +#define NATIVE_ALIGNMENT_SIZE 32 +#else +#define NATIVE_ALIGNMENT_SIZE 16 +#endif + #define IF_LEFT_true(x) x #define IF_LEFT_false(x) #define IF_RIGHT_true(x)