diff --git a/cmake/features.cmake b/cmake/features.cmake index 455ff213889..5f5a58d2daf 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -8,7 +8,14 @@ ov_option (ENABLE_PROXY "Proxy plugin for OpenVINO Runtime" ON) -ie_dependent_option (ENABLE_INTEL_CPU "CPU plugin for OpenVINO Runtime" ON "RISCV64 OR X86 OR X86_64 OR AARCH64 OR ARM" OFF) +if(WIN32 AND AARCH64 AND OV_COMPILER_IS_CLANG) + set(ENABLE_INTEL_CPU_DEFAULT OFF) +else() + set(ENABLE_INTEL_CPU_DEFAULT ON) +endif() + +ie_dependent_option (ENABLE_INTEL_CPU "CPU plugin for OpenVINO Runtime" ${ENABLE_INTEL_CPU_DEFAULT} + "RISCV64 OR X86 OR X86_64 OR AARCH64 OR ARM" OFF) ie_dependent_option (ENABLE_ARM_COMPUTE_CMAKE "Enable ARM Compute build via cmake" OFF "ENABLE_INTEL_CPU" OFF) diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt index 72784b79327..4212bacb8cc 100644 --- a/src/plugins/intel_cpu/CMakeLists.txt +++ b/src/plugins/intel_cpu/CMakeLists.txt @@ -36,7 +36,7 @@ set(OV_CPU_ARM_TARGET_ARCH ${OV_CPU_ARM_TARGET_ARCH_DEFAULT}) if(X86 OR X86_64 OR AARCH64) # disable mlas with webassembly - if(EMSCRIPTEN OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7)) + if(EMSCRIPTEN OR (WIN32 AND AARCH64) OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7)) set(ENABLE_MLAS_FOR_CPU_DEFAULT OFF) else() set(ENABLE_MLAS_FOR_CPU_DEFAULT ON) diff --git a/src/plugins/intel_cpu/src/nodes/subgraph.cpp b/src/plugins/intel_cpu/src/nodes/subgraph.cpp index ce0216b4fd5..5a70cf89d2d 100644 --- a/src/plugins/intel_cpu/src/nodes/subgraph.cpp +++ b/src/plugins/intel_cpu/src/nodes/subgraph.cpp @@ -517,9 +517,14 @@ Snippet::SnippetJitExecutor::SnippetJitExecutor(const SnippetAttrs& attrs, bool snippet_for_generation = std::make_shared(subgraph_node_inputs, new_body); ov::copy_runtime_info(snippetAttrs.snippet, snippet_for_generation); snippet_for_generation->set_friendly_name(snippetAttrs.snippet->get_friendly_name()); - auto host_isa = dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx512_core) ? - dnnl::impl::cpu::x64::avx512_core : dnnl::impl::cpu::x64::avx2; +#if defined(OPENVINO_ARCH_X86_64) + auto host_isa = dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx512_core) + ? dnnl::impl::cpu::x64::avx512_core + : dnnl::impl::cpu::x64::avx2; snippet_for_generation->set_generator(std::make_shared(host_isa)); +#else + IE_THROW(NotImplemented) << "CPU plugin: code-generation is not supported on non-x64 platforms"; +#endif // OPENVINO_ARCH_X86_64 }; // is_canonicalized is ture means just reshape canonicalized graph with new input shapes, and get updated master shape, @@ -693,12 +698,15 @@ bool Snippet::SnippetJitExecutor::optimizeExecDomain(std::vector& in void Snippet::SnippetJitExecutor::generate(const jit_snippets_compile_args* jcp) { using Manager = snippets::pass::Manager; + std::vector backend_passes; +#if defined(OPENVINO_ARCH_X86_64) using PassPosition = snippets::pass::Manager::PassPosition; using Place = snippets::pass::Manager::PassPosition::Place; - std::vector backend_passes; - -#define SNIPPETS_REGISTER_PASS(PASS_POS, PASS, ...) \ - backend_passes.emplace_back(PASS_POS, std::make_shared(__VA_ARGS__)) +# define SNIPPETS_REGISTER_PASS(PASS_POS, PASS, ...) \ + backend_passes.emplace_back(PASS_POS, std::make_shared(__VA_ARGS__)) +#else +# define SNIPPETS_REGISTER_PASS(PASS_POS, PASS, ...) +#endif // OPENVINO_ARCH_X86_64 SNIPPETS_REGISTER_PASS(PassPosition(Place::PipelineStart), ConvertToSwishCPU); if (enforceBF16 && snippet_for_generation->has_domain_sensitive_ops()) {