Browse Source

!1835 move opt to ge_compile

From: @chen-hua-baker
Reviewed-by: @ji_chen
Signed-off-by: @ji_chen
tags/v1.3.0
mindspore-ci-bot Gitee 4 years ago
parent
commit
f410cde8f2
8 changed files with 28 additions and 18 deletions
  1. +8
    -0
      ge/CMakeLists.txt
  2. +0
    -7
      ge/common/CMakeLists.txt
  3. +1
    -1
      ge/ge_opt_info/ge_opt_info.cc
  4. +3
    -3
      ge/ge_opt_info/ge_opt_info.h
  5. +1
    -1
      ge/graph/manager/graph_manager.cc
  6. +1
    -1
      tests/st/testcase/test_ge_opt_info.cc
  7. +13
    -4
      tests/ut/ge/CMakeLists.txt
  8. +1
    -1
      tests/ut/ge/ge_opt_info/ge_opt_info_unittest.cc

+ 8
- 0
ge/CMakeLists.txt View File

@@ -434,6 +434,7 @@ set(TRAIN_SRC_LIST
"graph/build/memory/max_block_mem_assigner.cc"
"graph/build/memory/var_mem_assign_util.cc"
"graph/build/memory/buffer_pool_mem_assigner.cc"
"ge_opt_info/ge_opt_info.cc"
)

set(INFER_SRC_LIST
@@ -711,6 +712,7 @@ set(INFER_SRC_LIST
"graph/build/memory/max_block_mem_assigner.cc"
"graph/build/memory/var_mem_assign_util.cc"
"graph/build/memory/buffer_pool_mem_assigner.cc"
"ge_opt_info/ge_opt_info.cc"
)

if (NOT ENABLE_D AND NOT ENABLE_ACL AND NOT ENABLE_MS_TESTCASES)
@@ -772,11 +774,13 @@ target_include_directories(ge_runner SYSTEM PRIVATE
${GE_CODE_DIR}/../inc/cce
${GE_CODE_DIR}/../toolchain/ide/ide-daemon/external
${GE_CODE_DIR}/../abl/adump/external
${GE_CODE_DIR}/../abl/licctrll
#### blue zone
${ASCEND_DIR}/driver/include
${ASCEND_DIR}/fwkacllib/include
${GE_CODE_DIR}/third_party/fwkacllib/inc
${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain
${GE_CODE_DIR}/third_party/fwkacllib/inc/opt_info
)

target_link_options(ge_runner PRIVATE
@@ -799,6 +803,7 @@ target_link_libraries(ge_runner PRIVATE
runtime
error_manager
ascend_hal_stub
opt_feature
-Wl,--as-needed
json
-lrt
@@ -853,11 +858,13 @@ target_include_directories(ge_compiler SYSTEM PRIVATE
${GE_CODE_DIR}/../inc/cce
${GE_CODE_DIR}/../toolchain/ide/ide-daemon/external
${GE_CODE_DIR}/../abl/adump/external
${GE_CODE_DIR}/../abl/licctrl
#### blue zone ####
${ASCEND_DIR}/driver/include
${ASCEND_DIR}/fwkacllib/include
${GE_CODE_DIR}/third_party/fwkacllib/inc
${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain
${GE_CODE_DIR}/third_party/fwkacllib/inc/opt_info
)

target_link_options(ge_compiler PRIVATE
@@ -877,6 +884,7 @@ target_link_libraries(ge_compiler PRIVATE
error_manager
slog
runtime_compile
opt_feature
-Wl,--as-needed
json
-lrt


+ 0
- 7
ge/common/CMakeLists.txt View File

@@ -43,7 +43,6 @@ set(SRC_LIST
"op/ge_op_utils.cc"
"thread_pool.cc"
"ge/tbe_plugin_manager.cc"
"ge_opt_info.cc"
)

if (NOT ENABLE_D AND NOT ENABLE_ACL)
@@ -87,12 +86,10 @@ target_include_directories(ge_common PRIVATE
#### yellow zone ####
${GE_DEPEND_DIR}/inc
${GE_DEPEND_DIR}/inc/cce
${GE_DEPEND_DIR}/abl/licctrl
#### blue zone ####
#${GE_DEPEND_DIR}/include
${GE_CODE_DIR}/third_party/fwkacllib/inc
${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain
${GE_CODE_DIR}/third_party/fwkacllib/inc/opt_info
)

target_link_options(ge_common PRIVATE
@@ -157,12 +154,10 @@ target_include_directories(ge_common_static PRIVATE
#### yellow zone ####
${GE_DEPEND_DIR}/inc
${GE_DEPEND_DIR}/inc/cce
${GE_DEPEND_DIR}/abl/licctrl
#### blue zone ####
#${GE_DEPEND_DIR}/include
${GE_CODE_DIR}/third_party/fwkacllib/inc
${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain
${GE_CODE_DIR}/third_party/fwkacllib/inc/opt_info
)

target_link_libraries(ge_common_static PRIVATE
@@ -215,7 +210,6 @@ target_include_directories(ge_common PRIVATE
${CMAKE_BINARY_DIR}/proto/graphengine_protos
${GE_CODE_DIR}/third_party/fwkacllib/inc
${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain
${GE_CODE_DIR}/third_party/fwkacllib/inc/opt_info
)

target_link_options(ge_common PRIVATE
@@ -231,7 +225,6 @@ target_link_libraries(ge_common PRIVATE
c_sec
error_manager
slog
opt_feature
static_mmpa
-Wl,--as-needed
json


ge/common/ge_opt_info.cc → ge/ge_opt_info/ge_opt_info.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "common/ge_opt_info.h"
#include "ge_opt_info/ge_opt_info.h"

#include <string>
#include <map>

ge/common/ge_opt_info.h → ge/ge_opt_info/ge_opt_info.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef GE_COMMON_GE_OPT_INFO_H_
#define GE_COMMON_GE_OPT_INFO_H_
#ifndef GE_OPT_INFO_GE_OPT_INFO_H_
#define GE_OPT_INFO_GE_OPT_INFO_H_

#include "ge/ge_api_error_codes.h"
#include "register/register_types.h"
@@ -28,4 +28,4 @@ class FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY GeOptInfo {
};
} // namespace ge

#endif // GE_COMMON_GE_OPT_INFO_H_
#endif // GE_OPT_INFO_GE_OPT_INFO_H_

+ 1
- 1
ge/graph/manager/graph_manager.cc View File

@@ -27,7 +27,7 @@
#include "common/math/math_util.h"
#include "common/thread_pool.h"
#include "common/dump/dump_manager.h"
#include "common/ge_opt_info.h"
#include "ge_opt_info/ge_opt_info.h"
#include "analyzer/analyzer.h"
#include "graph/common/ge_call_wrapper.h"
#include "graph/common/local_context.h"


+ 1
- 1
tests/st/testcase/test_ge_opt_info.cc View File

@@ -30,7 +30,7 @@
#include "ge_graph_dsl/op_desc/op_desc_cfg_box.h"
#define protected public
#define private public
#include "common/ge_opt_info.h"
#include "ge_opt_info/ge_opt_info.h"
#undef private
#undef protected



+ 13
- 4
tests/ut/ge/CMakeLists.txt View File

@@ -173,7 +173,6 @@ set(COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/common/dump/exception_dumper.cc"
"${GE_CODE_DIR}/ge/common/dump/opdebug_register.cc"
"${GE_CODE_DIR}/ge/common/dump/dump_op.cc"
"${GE_CODE_DIR}/ge/common/ge_opt_info.cc"
"${GE_CODE_DIR}/ge/common/helper/om_file_helper.cc"
"${GE_CODE_DIR}/ge/model/ge_root_model.cc"
"${GE_CODE_DIR}/ge/common/model_parser/model_parser.cc"
@@ -348,6 +347,7 @@ set(COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/common/ge/datatype_util.cc"
"${GE_CODE_DIR}/ge/ge_local_engine/engine/host_cpu_engine.cc"
"${GE_CODE_DIR}/ge/session/omg.cc"
"${GE_CODE_DIR}/ge/ge_opt_info/ge_opt_info.cc"
)

set(COMMON_FORMAT_SRC_FILES
@@ -379,7 +379,6 @@ set(GRAPH_OPTIMIZE_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/optimize/mem_rw_conflict_optimize.cc"
)


set(GRAPH_PREPARE_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/preprocess/graph_preprocess.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/insert_op/util_insert_aipp_op.cc"
@@ -455,6 +454,7 @@ set(GRAPH_EXECUTE_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/manager/graph_manager.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_context.cc"
"${GE_CODE_DIR}/ge/graph/manager/util/rt_context_util.cc"
"${GE_CODE_DIR}/ge/ge_opt_info/ge_opt_info.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_context.h"
)

@@ -630,6 +630,10 @@ set(SINGLE_OP_SRC_FILES
"${GE_CODE_DIR}/ge/hybrid/hybrid_davinci_model.cc"
)

set(GE_OPT_INFO_SRC_FILES
"${GE_CODE_DIR}/ge/ge_opt_info/ge_opt_info.cc"
)

# test files
set(COMMON_TEST_FILES
"graph/passes/graph_builder_utils.cc"
@@ -767,10 +771,9 @@ set(MULTI_PARTS_TEST_FILES
"graph/transop_util_unittest.cc"
"common/datatype_transfer_unittest.cc"
"common/dump_manager_unittest.cc"
"common/dump_op_unittest.cc"
"common/dump_exception_unittest.cc"
"common/dump_op_unittest.cc"
"common/opdebug_register_unittest.cc"
"common/ge_opt_info_unittest.cc"
"common/format_transfer_unittest.cc"
"common/format_transfer_transpose_unittest.cc"
"common/format_transfer_nchw_5d_unittest.cc"
@@ -815,6 +818,10 @@ set(MULTI_PARTS_TEST_FILES
"common/host_cpu_engine_unittest.cc"
)

set(GE_OPT_INFO_TEST_FILES
"ge_opt_info/ge_opt_info_unittest.cc"
)

set(GENERATOR_TEST_FILES
"generator/ge_generator_unittest.cc"
)
@@ -1110,10 +1117,12 @@ target_link_libraries(ut_libge_multiparts_utest

# libge_others_utest
add_executable(ut_libge_others_utest
${GE_OPT_INFO_SRC_FILES}
${COMMON_TEST_FILES}
${PASS_TEST_FILES}
${EXECUTE_TEST_FILES}
${OTHERS_TEST_FILES}
${GE_OPT_INFO_TEST_FILES}
)

target_compile_options(ut_libge_others_utest PRIVATE


tests/ut/ge/common/ge_opt_info_unittest.cc → tests/ut/ge/ge_opt_info/ge_opt_info_unittest.cc View File

@@ -19,7 +19,7 @@

#define protected public
#define private public
#include "common/ge_opt_info.h"
#include "ge_opt_info/ge_opt_info.h"
#include "graph/ge_local_context.h"
#include "external/ge/ge_api_types.h"
#undef private

Loading…
Cancel
Save