From 6c0cddec78025b6021d238cd225640c3e1ffbdc9 Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Mon, 17 Jan 2022 16:16:03 +0300 Subject: [PATCH] Removed redundant sources from core component (#9689) * Removed redundant sources from core component * Fixed CC build * Removed redundant includes --- .../src/transformations}/convert_precision.cpp | 0 .../src/transformations}/fix_rt_info.cpp | 0 .../src/transformations}/init_node_info.cpp | 0 .../rt_info/fused_names_attribute.cpp | 0 .../rt_info/preprocessing_attribute.cpp | 0 .../rt_info/primitives_priority_attribute.cpp | 0 .../transformations}/smart_reshape/matmul_sr.cpp | 0 .../smart_reshape/mimic_set_batch_size.cpp | 0 .../smart_reshape/proposal_scales_stridedslice.cpp | 0 .../smart_reshape/reshape_to_1D.cpp | 0 .../smart_reshape/set_batch_size.cpp | 4 +--- .../smart_reshape/smart_reshape.cpp | 0 .../smart_reshape/strided_slice_squeeze.cpp | 4 +--- src/core/CMakeLists.txt | 13 ++----------- .../ie_legacy => inference/src}/blob_factory.cpp | 0 .../ie_legacy => inference/src}/ie_blob_common.cpp | 0 .../src/ie_legacy => inference/src}/ie_layouts.cpp | 0 .../src}/system_allocator.cpp | 0 18 files changed, 4 insertions(+), 17 deletions(-) rename src/{core/src/pass => common/transformations/src/transformations}/convert_precision.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/fix_rt_info.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/init_node_info.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/rt_info/fused_names_attribute.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/rt_info/preprocessing_attribute.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/rt_info/primitives_priority_attribute.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/smart_reshape/matmul_sr.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/smart_reshape/mimic_set_batch_size.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/smart_reshape/proposal_scales_stridedslice.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/smart_reshape/reshape_to_1D.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/smart_reshape/set_batch_size.cpp (87%) rename src/{core/src/pass => common/transformations/src/transformations}/smart_reshape/smart_reshape.cpp (100%) rename src/{core/src/pass => common/transformations/src/transformations}/smart_reshape/strided_slice_squeeze.cpp (98%) rename src/{core/src/ie_legacy => inference/src}/blob_factory.cpp (100%) rename src/{core/src/ie_legacy => inference/src}/ie_blob_common.cpp (100%) rename src/{core/src/ie_legacy => inference/src}/ie_layouts.cpp (100%) rename src/{core/src/ie_legacy => inference/src}/system_allocator.cpp (100%) diff --git a/src/core/src/pass/convert_precision.cpp b/src/common/transformations/src/transformations/convert_precision.cpp similarity index 100% rename from src/core/src/pass/convert_precision.cpp rename to src/common/transformations/src/transformations/convert_precision.cpp diff --git a/src/core/src/pass/fix_rt_info.cpp b/src/common/transformations/src/transformations/fix_rt_info.cpp similarity index 100% rename from src/core/src/pass/fix_rt_info.cpp rename to src/common/transformations/src/transformations/fix_rt_info.cpp diff --git a/src/core/src/pass/init_node_info.cpp b/src/common/transformations/src/transformations/init_node_info.cpp similarity index 100% rename from src/core/src/pass/init_node_info.cpp rename to src/common/transformations/src/transformations/init_node_info.cpp diff --git a/src/core/src/pass/rt_info/fused_names_attribute.cpp b/src/common/transformations/src/transformations/rt_info/fused_names_attribute.cpp similarity index 100% rename from src/core/src/pass/rt_info/fused_names_attribute.cpp rename to src/common/transformations/src/transformations/rt_info/fused_names_attribute.cpp diff --git a/src/core/src/pass/rt_info/preprocessing_attribute.cpp b/src/common/transformations/src/transformations/rt_info/preprocessing_attribute.cpp similarity index 100% rename from src/core/src/pass/rt_info/preprocessing_attribute.cpp rename to src/common/transformations/src/transformations/rt_info/preprocessing_attribute.cpp diff --git a/src/core/src/pass/rt_info/primitives_priority_attribute.cpp b/src/common/transformations/src/transformations/rt_info/primitives_priority_attribute.cpp similarity index 100% rename from src/core/src/pass/rt_info/primitives_priority_attribute.cpp rename to src/common/transformations/src/transformations/rt_info/primitives_priority_attribute.cpp diff --git a/src/core/src/pass/smart_reshape/matmul_sr.cpp b/src/common/transformations/src/transformations/smart_reshape/matmul_sr.cpp similarity index 100% rename from src/core/src/pass/smart_reshape/matmul_sr.cpp rename to src/common/transformations/src/transformations/smart_reshape/matmul_sr.cpp diff --git a/src/core/src/pass/smart_reshape/mimic_set_batch_size.cpp b/src/common/transformations/src/transformations/smart_reshape/mimic_set_batch_size.cpp similarity index 100% rename from src/core/src/pass/smart_reshape/mimic_set_batch_size.cpp rename to src/common/transformations/src/transformations/smart_reshape/mimic_set_batch_size.cpp diff --git a/src/core/src/pass/smart_reshape/proposal_scales_stridedslice.cpp b/src/common/transformations/src/transformations/smart_reshape/proposal_scales_stridedslice.cpp similarity index 100% rename from src/core/src/pass/smart_reshape/proposal_scales_stridedslice.cpp rename to src/common/transformations/src/transformations/smart_reshape/proposal_scales_stridedslice.cpp diff --git a/src/core/src/pass/smart_reshape/reshape_to_1D.cpp b/src/common/transformations/src/transformations/smart_reshape/reshape_to_1D.cpp similarity index 100% rename from src/core/src/pass/smart_reshape/reshape_to_1D.cpp rename to src/common/transformations/src/transformations/smart_reshape/reshape_to_1D.cpp diff --git a/src/core/src/pass/smart_reshape/set_batch_size.cpp b/src/common/transformations/src/transformations/smart_reshape/set_batch_size.cpp similarity index 87% rename from src/core/src/pass/smart_reshape/set_batch_size.cpp rename to src/common/transformations/src/transformations/smart_reshape/set_batch_size.cpp index 0e3bb2888d5..73fd0958b2b 100644 --- a/src/core/src/pass/smart_reshape/set_batch_size.cpp +++ b/src/common/transformations/src/transformations/smart_reshape/set_batch_size.cpp @@ -15,9 +15,7 @@ NGRAPH_RTTI_DEFINITION(ngraph::pass::SetBatchSize, "SetBatchSize", 0); bool ngraph::pass::SetBatchSize::run_on_model(const std::shared_ptr& f) { - // TODO: enable conditional compile - // RUN_ON_FUNCTION_SCOPE(SetBatchSize); - OV_ITT_SCOPED_TASK(ov::itt::domains::nGraph, "ngraph::pass::SetBatchSize"); + RUN_ON_FUNCTION_SCOPE(SetBatchSize); ngraph::pass::Manager manager; // This pass must be called first in pipeline diff --git a/src/core/src/pass/smart_reshape/smart_reshape.cpp b/src/common/transformations/src/transformations/smart_reshape/smart_reshape.cpp similarity index 100% rename from src/core/src/pass/smart_reshape/smart_reshape.cpp rename to src/common/transformations/src/transformations/smart_reshape/smart_reshape.cpp diff --git a/src/core/src/pass/smart_reshape/strided_slice_squeeze.cpp b/src/common/transformations/src/transformations/smart_reshape/strided_slice_squeeze.cpp similarity index 98% rename from src/core/src/pass/smart_reshape/strided_slice_squeeze.cpp rename to src/common/transformations/src/transformations/smart_reshape/strided_slice_squeeze.cpp index a8c3754ef6c..a18d642ab93 100644 --- a/src/core/src/pass/smart_reshape/strided_slice_squeeze.cpp +++ b/src/common/transformations/src/transformations/smart_reshape/strided_slice_squeeze.cpp @@ -223,9 +223,7 @@ bool squeezes_perform_the_same(std::shared_ptr lhs, } // namespace bool ngraph::pass::SharedSqueeze::run_on_model(const std::shared_ptr& f) { - // TODO: enable conditional compile - // RUN_ON_FUNCTION_SCOPE(SharedSqueeze); - OV_ITT_SCOPED_TASK(ov::itt::domains::nGraph, "ngraph::pass::SharedSqueeze"); + RUN_ON_FUNCTION_SCOPE(SharedSqueeze); bool graph_rewritten = false; diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 12c2db6f008..16ab5dfa6a9 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -22,24 +22,15 @@ add_subdirectory(builder) add_subdirectory(reference) add_subdirectory(shape_inference) -# WA for Tensor implementation via ie::Blob::Ptr -set(IE_SHARED_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ie_legacy/blob_factory.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/ie_legacy/ie_blob_common.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/ie_legacy/ie_layouts.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/ie_legacy/system_allocator.cpp") -set(MIXED_SRC ${IE_SHARED_SRCS} +set(MIXED_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/runtime/allocator.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/runtime/ov_tensor.cpp") set_property(SOURCE ${MIXED_SRC} APPEND PROPERTY INCLUDE_DIRECTORIES $/src - $ $) -set_source_files_properties(${MIXED_SRC} - PROPERTIES COMPILE_DEFINITIONS IMPLEMENT_INFERENCE_ENGINE_API) - # Create named folders for the sources within the .vcproj # Empty name lists them directly under the .vcproj @@ -51,7 +42,7 @@ add_library(ov_core_dev INTERFACE) target_include_directories(ov_core_dev INTERFACE $) # Create static or shared library depending on BUILD_SHARED_LIBS -add_library(ngraph_obj OBJECT ${LIBRARY_SRC} ${PUBLIC_HEADERS} ${IE_SHARED_SRCS}) +add_library(ngraph_obj OBJECT ${LIBRARY_SRC} ${PUBLIC_HEADERS}) target_compile_definitions(ngraph_obj PRIVATE IMPLEMENT_OPENVINO_API) diff --git a/src/core/src/ie_legacy/blob_factory.cpp b/src/inference/src/blob_factory.cpp similarity index 100% rename from src/core/src/ie_legacy/blob_factory.cpp rename to src/inference/src/blob_factory.cpp diff --git a/src/core/src/ie_legacy/ie_blob_common.cpp b/src/inference/src/ie_blob_common.cpp similarity index 100% rename from src/core/src/ie_legacy/ie_blob_common.cpp rename to src/inference/src/ie_blob_common.cpp diff --git a/src/core/src/ie_legacy/ie_layouts.cpp b/src/inference/src/ie_layouts.cpp similarity index 100% rename from src/core/src/ie_legacy/ie_layouts.cpp rename to src/inference/src/ie_layouts.cpp diff --git a/src/core/src/ie_legacy/system_allocator.cpp b/src/inference/src/system_allocator.cpp similarity index 100% rename from src/core/src/ie_legacy/system_allocator.cpp rename to src/inference/src/system_allocator.cpp