From 7d01779fe4486f2fc24569279a53a6ed028cd5b4 Mon Sep 17 00:00:00 2001 From: Ben Niu Date: Mon, 20 Nov 2023 14:02:52 -0800 Subject: [PATCH] Fix Arm64EC build for test_q4qdq.cpp Fix ifdef guards in test_q4qdq.cpp to exclude code blocks intended only for native x64 compilation instead of x64 + Arm64EC. --- onnxruntime/test/mlas/unittest/test_q4qdq.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/test/mlas/unittest/test_q4qdq.cpp b/onnxruntime/test/mlas/unittest/test_q4qdq.cpp index 955c3b1201989..c317395bee970 100644 --- a/onnxruntime/test/mlas/unittest/test_q4qdq.cpp +++ b/onnxruntime/test/mlas/unittest/test_q4qdq.cpp @@ -19,7 +19,7 @@ Module Name: #include "test_util.h" #include "mlas_q4.h" -#if (defined(_M_AMD64) || defined(__x86_64__)) +#if ((defined(_M_AMD64) && !defined(_M_ARM64EC)) || defined(__x86_64__)) /** * @brief For testing purpose, @@ -93,7 +93,7 @@ class MlasQ4dqTest : public MlasTestBase { << K << "] QType: " << qtype; } -#if (defined(_M_AMD64) || defined(__x86_64__)) +#if ((defined(_M_AMD64) && !defined(_M_ARM64EC)) || defined(__x86_64__)) /* Test MlasBlkQ4DequantSgemmPackB, make sure we can reuse SGEMM kernel as it rearrange B the same way as sgemm pack B*/ const size_t AlignedN = (N + 15) & ~15;