Browse Source

update build.sh

tags/v1.1.0
taoxiangdong 4 years ago
parent
commit
94c1cbb2dd
2 changed files with 24 additions and 6 deletions
  1. +20
    -4
      CMakeLists.txt
  2. +4
    -2
      build.sh

+ 20
- 4
CMakeLists.txt View File

@@ -80,9 +80,6 @@ if (ENABLE_OPEN_SRC)
message(FATAL_ERROR "This platform is not supported in train mode, build terminated") message(FATAL_ERROR "This platform is not supported in train mode, build terminated")
endif() endif()
elseif(PLATFORM STREQUAL "inference") elseif(PLATFORM STREQUAL "inference")
find_module(slog libslog.so ${ASCEND_DRIVER_DIR})
find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR})
find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR})
find_module(adump_server libadump_server.a ${ASCEND_ACL_DIR}) find_module(adump_server libadump_server.a ${ASCEND_ACL_DIR})
find_module(runtime libruntime.so ${ASCEND_ACL_DIR}) find_module(runtime libruntime.so ${ASCEND_ACL_DIR})
find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR}) find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR})
@@ -91,11 +88,30 @@ if (ENABLE_OPEN_SRC)
find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR}) find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR})
find_module(msprofiler libmsprofiler.a ${ASCEND_ACL_DIR}) find_module(msprofiler libmsprofiler.a ${ASCEND_ACL_DIR})
find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR}) find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR})
find_module(slog libslog.so ${ASCEND_ATC_DIR})
find_module(mmpa libmmpa.so ${ASCEND_ATC_DIR})
if(NOT PRODUCT STREQUAL "flr3") if(NOT PRODUCT STREQUAL "flr3")
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR})
find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR})
else()
find_module(msprof libmsprof.so ${ASCEND_ATC_DIR}) // 驱动包
endif() endif()
elseif(PLATFORM STREQUAL "all")
find_module(slog libslog.so ${ASCEND_DRIVER_DIR})
find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR})
find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR})
find_module(hccl libhccl.so ${ASCEND_RUNTIME_DIR})
find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR})
find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR})
find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR})
find_module(resource libresource.so ${ASCEND_RUNTIME_DIR})
find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR})
find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR})
find_module(msprofiler libmsprofiler.a ${ASCEND_RUNTIME_DIR})
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR})
find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR})
else() else()
message(FATAL_ERROR "Mode param is invalid, should be train or inference, build terminated")
message(FATAL_ERROR "PLATFORM param is invalid, should be train or inference, build terminated")
endif() endif()
endif() endif()




+ 4
- 2
build.sh View File

@@ -208,9 +208,11 @@ generate_package()


GRAPHENGINE_LIB_PATH="lib" GRAPHENGINE_LIB_PATH="lib"


find output/ -name graphengine_lib.tar -exec rm {} \;

cd "${OUTPUT_PATH}" cd "${OUTPUT_PATH}"

find ./ -name graphengine_lib.tar -exec rm {} \;

find ./bin -name atc -exec cp {} "${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH}" \;
tar -cf graphengine_lib.tar "${GRAPHENGINE_LIB_PATH}" tar -cf graphengine_lib.tar "${GRAPHENGINE_LIB_PATH}"
} }


Loading…
Cancel
Save