From f8b347ecd348b660017d8fb4cd0687eb2cede3b4 Mon Sep 17 00:00:00 2001 From: Evgeny Kotov Date: Wed, 7 Dec 2022 10:46:13 +0100 Subject: [PATCH] [GNA] Fixed extended debug build (#14355) * fix build * move debug define to cmake build options * using namespace * add debug build check * remove build type check --- cmake/features.cmake | 2 ++ src/plugins/intel_gna/CMakeLists.txt | 4 ++++ src/plugins/intel_gna/src/gna_plugin.cpp | 1 + src/plugins/intel_gna/src/log/debug.hpp | 2 -- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/features.cmake b/cmake/features.cmake index 6e1af7c367b..ed3388761c8 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -77,6 +77,8 @@ ie_dependent_option (ENABLE_TBBBIND_2_5 "Enable TBBBind_2_5 static usage in Open ie_dependent_option (ENABLE_INTEL_GNA "GNA support for OpenVINO Runtime" ON "NOT APPLE;NOT ANDROID;X86_64;CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5.4" OFF) +ie_option (ENABLE_INTEL_GNA_DEBUG "GNA debug build" OFF) + if(ENABLE_TESTS OR BUILD_SHARED_LIBS) set(ENABLE_IR_V7_READER_DEFAULT ON) else() diff --git a/src/plugins/intel_gna/CMakeLists.txt b/src/plugins/intel_gna/CMakeLists.txt index 039699fe3f7..f6d138062e1 100644 --- a/src/plugins/intel_gna/CMakeLists.txt +++ b/src/plugins/intel_gna/CMakeLists.txt @@ -8,6 +8,10 @@ endif() set(TARGET_NAME "openvino_intel_gna_plugin") +if (ENABLE_INTEL_GNA_DEBUG) + add_compile_definitions(GNA_DEBUG) +endif() + if(CMAKE_COMPILER_IS_GNUCC) ie_add_compiler_flags(-Wno-all) endif() diff --git a/src/plugins/intel_gna/src/gna_plugin.cpp b/src/plugins/intel_gna/src/gna_plugin.cpp index c83a022568a..6638df2ff27 100644 --- a/src/plugins/intel_gna/src/gna_plugin.cpp +++ b/src/plugins/intel_gna/src/gna_plugin.cpp @@ -127,6 +127,7 @@ using namespace InferenceEngine; using namespace InferenceEngine::details; using namespace GNAPluginNS; using namespace GNAPluginNS::memory; +using namespace ov::intel_gna::frontend; namespace InferenceEngine { template<> diff --git a/src/plugins/intel_gna/src/log/debug.hpp b/src/plugins/intel_gna/src/log/debug.hpp index 799cdbf2f43..f9b3956a726 100644 --- a/src/plugins/intel_gna/src/log/debug.hpp +++ b/src/plugins/intel_gna/src/log/debug.hpp @@ -6,8 +6,6 @@ #include -// #define GNA_DEBUG - #ifdef GNA_DEBUG /**