Skip to content

Commit

Permalink
Resolve "illegal instructions" for AVX512F tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nitheshsrikanth-mcw committed Dec 9, 2024
1 parent 2fb29c5 commit a4d5e62
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/vmulcaddc-microkernel-tester.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ class VMulCAddCMicrokernelTester {
#define XNN_TEST_VMULCADDC_ROW_DIV(ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, ROW_div) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t rows = row_tile * 2; rows <= row_tile * 4; rows += row_tile) { \
for (size_t channels = 1; channels <= channels_tile * 5; channels += std::max(1, channels_tile - 1)) { \
VMulCAddCMicrokernelTester() \
Expand All @@ -265,6 +266,7 @@ class VMulCAddCMicrokernelTester {
#define XNN_TEST_VMULCADDC_ROW_LT(ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, ROW_lt) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t rows = 1; rows < row_tile; rows++) { \
for (size_t channels = 1; channels <= channels_tile * 5; channels += std::max(1, channels_tile - 1)) { \
VMulCAddCMicrokernelTester() \
Expand All @@ -279,6 +281,7 @@ class VMulCAddCMicrokernelTester {
#define XNN_TEST_VMULCADDC_ROW_GT(ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, ROW_gt) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t rows = row_tile + 1; rows < row_tile * 2; rows++) { \
for (size_t channels = 1; channels <= channels_tile * 5; channels += std::max(1, channels_tile - 1)) { \
VMulCAddCMicrokernelTester() \
Expand All @@ -294,6 +297,7 @@ class VMulCAddCMicrokernelTester {
ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, channels_gt_) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t channels = channels_tile + 1; channels < (channels_tile == 1 ? 10 : channels_tile * 2); channels++) { \
VMulCAddCMicrokernelTester() \
.channel_tile(channels_tile) \
Expand All @@ -307,6 +311,7 @@ class VMulCAddCMicrokernelTester {
ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, channels_eq_) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
VMulCAddCMicrokernelTester() \
.channel_tile(channels_tile) \
.channels(channels_tile) \
Expand All @@ -318,6 +323,7 @@ class VMulCAddCMicrokernelTester {
ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, channels_div_) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t channels = channels_tile * 2; channels < channels_tile * 10; channels += channels_tile) { \
VMulCAddCMicrokernelTester() \
.channel_tile(channels_tile) \
Expand All @@ -331,6 +337,7 @@ class VMulCAddCMicrokernelTester {
ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, channels_lt_) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t channels = 1; channels < channels_tile; channels++) { \
VMulCAddCMicrokernelTester() \
.channel_tile(channels_tile) \
Expand All @@ -344,6 +351,7 @@ class VMulCAddCMicrokernelTester {
ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, input_stride) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t rows = 1; rows <= row_tile * 3; rows += std::max(1, row_tile - 1)) { \
for (size_t channels = 1; channels <= channels_tile * 5; channels += std::max(1, channels_tile - 1)) { \
VMulCAddCMicrokernelTester() \
Expand All @@ -360,6 +368,7 @@ class VMulCAddCMicrokernelTester {
ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, output_stride) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t rows = 1; rows <= row_tile * 3; rows += std::max(1, row_tile - 1)) { \
for (size_t channels = 1; channels <= channels_tile * 5; channels += std::max(1, channels_tile - 1)) { \
VMulCAddCMicrokernelTester() \
Expand All @@ -376,6 +385,7 @@ class VMulCAddCMicrokernelTester {
#define XNN_TEST_VMULCADDC_INPLACE(ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, inplace) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t rows = 1; rows <= row_tile * 3; rows += std::max(1, row_tile - 1)) { \
for (size_t channels = 1; channels <= channels_tile * 5; channels += std::max(1, channels_tile - 1)) { \
VMulCAddCMicrokernelTester() \
Expand All @@ -391,6 +401,7 @@ class VMulCAddCMicrokernelTester {
#define XNN_TEST_VMULCADDC_QMIN(ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, qmin) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t rows = 1; rows <= row_tile * 3; rows += std::max(1, row_tile - 1)) { \
for (size_t channels = 1; channels <= channels_tile * 5; channels += std::max(1, channels_tile - 1)) { \
VMulCAddCMicrokernelTester() \
Expand All @@ -406,6 +417,7 @@ class VMulCAddCMicrokernelTester {
#define XNN_TEST_VMULCADDC_QMAX(ukernel, arch_flags, row_tile, channels_tile, datatype, params_type, init_params) \
TEST(ukernel, qmax) \
{ \
TEST_REQUIRES_ARCH_FLAGS(arch_flags); \
for (size_t rows = 1; rows <= row_tile * 3; rows += std::max(1, row_tile - 1)) { \
for (size_t channels = 1; channels <= channels_tile * 5; channels += std::max(1, channels_tile - 1)) { \
VMulCAddCMicrokernelTester() \
Expand Down

0 comments on commit a4d5e62

Please sign in to comment.