From f2523efdb4a48a71798e3c47925f179f5952891d Mon Sep 17 00:00:00 2001 From: Alexandra Sidorova Date: Mon, 23 Dec 2024 15:42:13 +0400 Subject: [PATCH] [Snippets][CPU] Fixed build on non-x64 platforms --- .../snippets/cpu_runtime_configurator.cpp | 2 +- .../snippets/cpu_runtime_configurator.hpp | 6 ++-- src/plugins/intel_cpu/src/nodes/subgraph.cpp | 28 +++++++++---------- src/plugins/intel_cpu/src/nodes/subgraph.h | 4 +-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/plugins/intel_cpu/src/emitters/snippets/cpu_runtime_configurator.cpp b/src/plugins/intel_cpu/src/emitters/snippets/cpu_runtime_configurator.cpp index 3ad41d707bb96b..43b3ea14cc148a 100644 --- a/src/plugins/intel_cpu/src/emitters/snippets/cpu_runtime_configurator.cpp +++ b/src/plugins/intel_cpu/src/emitters/snippets/cpu_runtime_configurator.cpp @@ -7,7 +7,7 @@ #include "snippets/lowered/loop_manager.hpp" #include "snippets/utils/utils.hpp" -#ifdef OPENVINO_ARCH_X86_64 +#ifndef OPENVINO_ARCH_ARM64 # include "transformations/snippets/x64/pass/lowered/brgemm_copy_b_loop_ports_adjuster.hpp" # include "transformations/snippets/x64/pass/lowered/external_repacking_adjuster.hpp" #endif diff --git a/src/plugins/intel_cpu/src/emitters/snippets/cpu_runtime_configurator.hpp b/src/plugins/intel_cpu/src/emitters/snippets/cpu_runtime_configurator.hpp index a8bab52eb61513..513ff65fee912b 100644 --- a/src/plugins/intel_cpu/src/emitters/snippets/cpu_runtime_configurator.hpp +++ b/src/plugins/intel_cpu/src/emitters/snippets/cpu_runtime_configurator.hpp @@ -6,7 +6,7 @@ #include "emitters/snippets/jit_snippets_call_args.hpp" -#ifdef OPENVINO_ARCH_X86_64 +#ifndef OPENVINO_ARCH_ARM64 # include "emitters/snippets/x64/kernel_executors/brgemm_copy_b.hpp" #endif @@ -27,7 +27,7 @@ class CPURuntimeConfig : public ov::snippets::RuntimeConfig { std::string to_string() const override; #endif -#ifdef OPENVINO_ARCH_X86_64 +#ifndef OPENVINO_ARCH_ARM64 struct RepackedInput { RepackedInput() = default; RepackedInput(CpuBlockedMemoryDescPtr desc_, @@ -52,7 +52,7 @@ class CPURuntimeConfig : public ov::snippets::RuntimeConfig { SEPARATE, // should be separathy from kernel executed }; RepackingImplType repacking_impl_type = RepackingImplType::NONE; -#endif // OPENVINO_ARCH_X86_64 +#endif // OPENVINO_ARCH_ARM64 std::vector loop_args = {}; }; diff --git a/src/plugins/intel_cpu/src/nodes/subgraph.cpp b/src/plugins/intel_cpu/src/nodes/subgraph.cpp index 0f35c017ceded1..084915d019c8f0 100644 --- a/src/plugins/intel_cpu/src/nodes/subgraph.cpp +++ b/src/plugins/intel_cpu/src/nodes/subgraph.cpp @@ -96,10 +96,10 @@ class SubgraphStaticExecutor : public Subgraph::SubgraphExecutor { }; auto caller = [&](jit_snippets_call_args& call_args, const std::vector& indexes, size_t ithr) { -#ifdef OPENVINO_ARCH_X86_64 +#ifndef OPENVINO_ARCH_ARM64 if (should_repacking_be_in_parallel()) in_parallel_repack_inputs(inMemPtrs, indexes, ithr, call_args); -#endif // OPENVINO_ARCH_X86_64 +#endif // OPENVINO_ARCH_ARM64 callable(&call_args, indexes.data()); }; @@ -171,10 +171,10 @@ class SubgraphDynamicSpecializedExecutor : public Subgraph::SubgraphExecutor { auto caller = [&](jit_snippets_call_args& call_args, const std::vector& indexes, size_t ithr) { update_ptrs(call_args, src_ptrs, dst_ptrs, indexes); -#ifdef OPENVINO_ARCH_X86_64 +#ifndef OPENVINO_ARCH_ARM64 if (should_repacking_be_in_parallel()) in_parallel_repack_inputs(inMemPtrs, indexes, ithr, call_args); -#endif // OPENVINO_ARCH_X86_64 +#endif // OPENVINO_ARCH_ARM64 callable(&call_args); }; @@ -982,7 +982,7 @@ Subgraph::SubgraphExecutor::SubgraphExecutor(const std::shared_ptr(m_nthreads) * m_buffer_scratchpad_size; -#if defined(OPENVINO_ARCH_X86_64) +#ifndef OPENVINO_ARCH_ARM64 m_repacking_impl_type = snippet_config->repacking_impl_type; m_repacked_inputs = snippet_config->repacked_inputs; @@ -1007,7 +1007,7 @@ Subgraph::SubgraphExecutor::SubgraphExecutor(const std::shared_ptr Subgraph::SubgraphExecutor::separately_repack_inputs(const dnnl::stream& strm, const std::vector& srcMemPtrs) { auto get_batch_stride = [](const std::vector strides) { @@ -1093,7 +1093,7 @@ void Subgraph::SubgraphExecutor::in_parallel_repack_inputs(const std::vector& inMemPtrs, const std::vector& outMemPtrs) { -#ifdef OPENVINO_ARCH_X86_64 +#ifndef OPENVINO_ARCH_ARM64 if (should_repacking_be_separately()) { exec_impl(separately_repack_inputs(strm, inMemPtrs), outMemPtrs); return; } -#endif // OPENVINO_ARCH_X86_64 +#endif // OPENVINO_ARCH_ARM64 exec_impl(inMemPtrs, outMemPtrs); } diff --git a/src/plugins/intel_cpu/src/nodes/subgraph.h b/src/plugins/intel_cpu/src/nodes/subgraph.h index 74f84b11564989..fcdf31dcc4302e 100644 --- a/src/plugins/intel_cpu/src/nodes/subgraph.h +++ b/src/plugins/intel_cpu/src/nodes/subgraph.h @@ -173,7 +173,7 @@ class Subgraph::SubgraphExecutor { inline void segfault_detector(); #endif -#ifdef OPENVINO_ARCH_X86_64 +#ifndef OPENVINO_ARCH_ARM64 std::vector separately_repack_inputs(const dnnl::stream& strm, const std::vector& srcMemPtrs); void in_parallel_repack_inputs(const std::vector& inMemPtrs, const std::vector& indexes, @@ -214,7 +214,7 @@ class Subgraph::SubgraphExecutor { private: CPURuntimeConfig::RepackingImplType m_repacking_impl_type = CPURuntimeConfig::RepackingImplType::NONE; -#endif // OPENVINO_ARCH_X86_64 +#endif // OPENVINO_ARCH_ARM64 }; } // namespace node