fix compilation issue on Windows arm64 (#19873)
* fix compilation issue on Windows arm64 * fix build issue * fix build issue * disable clang compiler for Windows on ARM * disable clang compiler for cpu plugin * Update CMakeLists.txt removed fatal_error from cpu cmake * Update features.cmake disable Intel CPU plugin by default on Windows ARM64 with clangl-cl compiler * update comments * fix build issue --------- Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -517,9 +517,14 @@ Snippet::SnippetJitExecutor::SnippetJitExecutor(const SnippetAttrs& attrs, bool
|
||||
snippet_for_generation = std::make_shared<ov::snippets::op::Subgraph>(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<CPUGenerator>(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<VectorDims>& in
|
||||
|
||||
void Snippet::SnippetJitExecutor::generate(const jit_snippets_compile_args* jcp) {
|
||||
using Manager = snippets::pass::Manager;
|
||||
std::vector<Manager::PositionedPass> backend_passes;
|
||||
#if defined(OPENVINO_ARCH_X86_64)
|
||||
using PassPosition = snippets::pass::Manager::PassPosition;
|
||||
using Place = snippets::pass::Manager::PassPosition::Place;
|
||||
std::vector<Manager::PositionedPass> backend_passes;
|
||||
|
||||
#define SNIPPETS_REGISTER_PASS(PASS_POS, PASS, ...) \
|
||||
backend_passes.emplace_back(PASS_POS, std::make_shared<PASS>(__VA_ARGS__))
|
||||
# define SNIPPETS_REGISTER_PASS(PASS_POS, PASS, ...) \
|
||||
backend_passes.emplace_back(PASS_POS, std::make_shared<PASS>(__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()) {
|
||||
|
||||
Reference in New Issue
Block a user