|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- set(PROTO_LIST
- "${METADEF_DIR}/proto/om.proto"
- "${METADEF_DIR}/proto/ge_ir.proto"
- "${METADEF_DIR}/proto/insert_op.proto"
- "${METADEF_DIR}/proto/task.proto"
- )
-
- protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
-
- set(SRC_LIST
- "main.cc"
- "single_op_parser.cc"
- "keep_dtype_option.cc"
- "../session/omg.cc"
- "../ir_build/atc_ir_common.cc"
- )
-
- ############ atc ############
- add_executable(atc ${SRC_LIST} ${PROTO_HDRS})
-
- target_compile_options(atc PRIVATE
- -Werror
- -O2
- -Wno-deprecated-declarations
- )
-
- target_compile_definitions(atc PRIVATE
- PROTOBUF_INLINE_NOT_IN_HEADERS=0
- COMPILE_OMG_PACKAGE
- google=ascend_private
- LOG_CPP
- )
-
- target_include_directories(atc PRIVATE
- ${CMAKE_CURRENT_LIST_DIR}
- ${GE_CODE_DIR}
- ${GE_CODE_DIR}/ge
- ${GE_CODE_DIR}/inc/external
- ${GE_CODE_DIR}/common/inc/external
- ${GE_CODE_DIR}/common/inc/external/graph
- ${GE_CODE_DIR}/inc
- ${GE_CODE_DIR}/inc/framework
- ${METADEF_DIR}/inc
- ${METADEF_DIR}/inc/graph
- ${METADEF_DIR}/inc/register
- ${METADEF_DIR}/inc/external
- ${METADEF_DIR}/inc/external/graph
- ${METADEF_DIR}/inc/external/register
- ${PARSER_DIR}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/proto/ge
- #### yellow zone ####
- ${GE_CODE_DIR}/../inc
- ${GE_CODE_DIR}/../inc/common
- #### blue zone ####
- ${GE_CODE_DIR}/third_party/fwkacllib/inc
- ${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain
- )
-
- target_link_libraries(atc PRIVATE
- $<BUILD_INTERFACE:intf_pub>
- ascend_protobuf
- ge_common
- register
- c_sec
- graph
- error_manager
- ge_compiler
- parser_common
- gflags
- json
- runtime_compile
- slog
- static_mmpa
- -lrt
- -ldl
- )
-
- ############ atc_atc.bin ############
- add_executable(atc_atc.bin ${SRC_LIST} ${PROTO_HDRS})
-
- target_compile_options(atc_atc.bin PRIVATE
- -Werror
- -O2
- -Wno-deprecated-declarations
- )
-
- target_compile_definitions(atc_atc.bin PRIVATE
- PROTOBUF_INLINE_NOT_IN_HEADERS=0
- COMPILE_OMG_PACKAGE
- google=ascend_private
- LOG_CPP
- )
-
- target_include_directories(atc_atc.bin PRIVATE
- ${CMAKE_CURRENT_LIST_DIR}
- ${GE_CODE_DIR}
- ${GE_CODE_DIR}/ge
- ${GE_CODE_DIR}/inc/external
- ${GE_CODE_DIR}/common/inc/external
- ${GE_CODE_DIR}/common/inc/external/graph
- ${GE_CODE_DIR}/inc
- ${GE_CODE_DIR}/inc/framework
- ${METADEF_DIR}/inc
- ${METADEF_DIR}/inc/graph
- ${METADEF_DIR}/inc/register
- ${METADEF_DIR}/inc/external
- ${METADEF_DIR}/inc/external/graph
- ${METADEF_DIR}/inc/external/register
- ${PARSER_DIR}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/proto/ge
- #### yellow zone ####
- ${GE_CODE_DIR}/../inc
- ${GE_CODE_DIR}/../inc/common
- #### blue zone ####
- ${GE_CODE_DIR}/third_party/fwkacllib/inc
- ${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain
- )
-
- target_link_libraries(atc_atc.bin PRIVATE
- $<BUILD_INTERFACE:intf_pub>
- ascend_protobuf
- ge_common
- register
- c_sec
- graph
- error_manager
- ge_compiler
- parser_common
- gflags
- json
- runtime_compile
- slog
- static_mmpa
- -lrt
- -ldl
- )
-
- set_target_properties(atc_atc.bin PROPERTIES
- OUTPUT_NAME atc.bin
- RUNTIME_OUTPUT_DIRECTORY atclib
- )
-
- ############ fwk_atc.bin ############
- add_executable(fwk_atc.bin ${SRC_LIST} ${PROTO_HDRS})
-
- target_compile_options(fwk_atc.bin PRIVATE
- -Werror
- -O2
- -Wno-deprecated-declarations
- )
-
- target_compile_definitions(fwk_atc.bin PRIVATE
- PROTOBUF_INLINE_NOT_IN_HEADERS=0
- COMPILE_OMG_PACKAGE
- google=ascend_private
- LOG_CPP
- )
-
- target_include_directories(fwk_atc.bin PRIVATE
- ${CMAKE_CURRENT_LIST_DIR}
- ${GE_CODE_DIR}
- ${GE_CODE_DIR}/ge
- ${GE_CODE_DIR}/inc/external
- ${GE_CODE_DIR}/common/inc/external
- ${GE_CODE_DIR}/common/inc/external/graph
- ${GE_CODE_DIR}/inc
- ${GE_CODE_DIR}/inc/framework
- ${METADEF_DIR}/inc
- ${METADEF_DIR}/inc/graph
- ${METADEF_DIR}/inc/register
- ${METADEF_DIR}/inc/external
- ${METADEF_DIR}/inc/external/graph
- ${METADEF_DIR}/inc/external/register
- ${PARSER_DIR}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/proto/ge
- #### yellow zone ####
- ${GE_CODE_DIR}/../inc
- ${GE_CODE_DIR}/../inc/common
- #### blue zone ####
- ${GE_CODE_DIR}/third_party/fwkacllib/inc
- ${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain
- )
-
- target_link_libraries(fwk_atc.bin PRIVATE
- $<BUILD_INTERFACE:intf_pub>
- ascend_protobuf
- ge_common
- register
- c_sec
- graph
- error_manager
- ge_runner
- parser_common
- gflags
- json
- runtime
- slog
- static_mmpa
- -lrt
- -ldl
- )
-
- set_target_properties(fwk_atc.bin PROPERTIES
- OUTPUT_NAME atc.bin
- RUNTIME_OUTPUT_DIRECTORY fwkacl
- )
-
- ############ install ############
- set(INSTALL_BASE_DIR "")
- set(INSTALL_LIBRARY_DIR lib)
-
- install(TARGETS atc OPTIONAL
- LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
- )
-
- install(TARGETS atc_atc.bin OPTIONAL
- RUNTIME DESTINATION ${INSTALL_LIBRARY_DIR}/atclib
- )
-
- install(TARGETS fwk_atc.bin OPTIONAL
- RUNTIME DESTINATION ${INSTALL_LIBRARY_DIR}/fwkacl
- )
|