From 4e1e3a8e96d19038230d4c2d9ba19ee0cda88fac Mon Sep 17 00:00:00 2001 From: Jonathan Clohessy Date: Mon, 18 May 2026 20:05:51 +0100 Subject: [PATCH] Remove ifdef for linux targets Signed-off-by: Jonathan Clohessy --- onnxruntime/core/providers/cpu/nn/conv.cc | 8 ++++---- onnxruntime/core/providers/cpu/nn/conv.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/onnxruntime/core/providers/cpu/nn/conv.cc b/onnxruntime/core/providers/cpu/nn/conv.cc index 87ce1b05caae2..d684da19cc11e 100644 --- a/onnxruntime/core/providers/cpu/nn/conv.cc +++ b/onnxruntime/core/providers/cpu/nn/conv.cc @@ -23,7 +23,7 @@ #include "core/common/safeint.h" #include "core/util/math_cpuonly.h" -#if defined(USE_KLEIDIAI) && defined(__aarch64__) && defined(__linux__) +#if defined(USE_KLEIDIAI) && defined(__aarch64__) #include "core/mlas/lib/kleidiai/mlasi_kleidiai.h" #endif @@ -191,7 +191,7 @@ Status Conv::Compute(OpKernelContext* context) const { return Status::OK(); } -#if defined(USE_KLEIDIAI) && defined(__aarch64__) && defined(__linux__) +#if defined(USE_KLEIDIAI) && defined(__aarch64__) Status Conv::EnsurePackedChannelsLastFilter(concurrency::ThreadPool* thread_pool, size_t filter_count_per_group, size_t input_channels_per_group, @@ -329,7 +329,7 @@ Status Conv::Compute(OpKernelContext* context) const { narrow(M / conv_attrs_.group), /*Beta*/ 0.0f); -#if defined(USE_KLEIDIAI) && defined(__aarch64__) && defined(__linux__) +#if defined(USE_KLEIDIAI) && defined(__aarch64__) if (nhwc_fastpath && can_cache_packed_filter_) { ORT_RETURN_IF_ERROR(EnsurePackedChannelsLastFilter(thread_pool, narrow(M / conv_attrs_.group), @@ -385,7 +385,7 @@ Status Conv::Compute(OpKernelContext* context) const { nhwc_fastpath ? 0.0f : Beta, thread_pool); -#if defined(USE_KLEIDIAI) && defined(__aarch64__) && defined(__linux__) +#if defined(USE_KLEIDIAI) && defined(__aarch64__) if (nhwc_fastpath && packed_filter_ != nullptr) { Parameters.FilterIsPacked = true; Parameters.PackedFilter = packed_filter_.get(); diff --git a/onnxruntime/core/providers/cpu/nn/conv.h b/onnxruntime/core/providers/cpu/nn/conv.h index 1cbe417cdbd96..09cad18db1228 100644 --- a/onnxruntime/core/providers/cpu/nn/conv.h +++ b/onnxruntime/core/providers/cpu/nn/conv.h @@ -31,7 +31,7 @@ class Conv : public OpKernel { activation_.ActivationKind = MlasIdentityActivation; SetupMlasBackendKernelSelectorFromConfigOptions(mlas_backend_kernel_selector_config_, info.GetConfigOptions()); -#if defined(USE_KLEIDIAI) && defined(__aarch64__) && defined(__linux__) +#if defined(USE_KLEIDIAI) && defined(__aarch64__) if (channels_last_) { const auto& input_defs = info.node().InputDefs(); const bool has_bias_input = input_defs.size() >= 3 && input_defs[2] != nullptr; @@ -56,7 +56,7 @@ class Conv : public OpKernel { ConvAttributes conv_attrs_; bool channels_last_{false}; -#if defined(USE_KLEIDIAI) && defined(__aarch64__) && defined(__linux__) +#if defined(USE_KLEIDIAI) && defined(__aarch64__) private: Status EnsurePackedChannelsLastFilter(concurrency::ThreadPool* thread_pool, size_t filter_count_per_group,