forked from mindspore-Ecosystem/mindspore
Disable AVX while Enable ASAN
solve build errors while change BUILD_PATH
This commit is contained in:
parent
1f2080f860
commit
08940a7b25
6
build.sh
6
build.sh
|
@ -459,7 +459,7 @@ build_mindspore()
|
|||
fi
|
||||
echo "${CMAKE_ARGS}"
|
||||
if [[ "X$INC_BUILD" = "Xoff" ]]; then
|
||||
cmake ${CMAKE_ARGS} ../..
|
||||
cmake ${CMAKE_ARGS} ${BASEPATH}
|
||||
fi
|
||||
if [[ -n "$VERBOSE" ]]; then
|
||||
CMAKE_VERBOSE="--verbose"
|
||||
|
@ -849,8 +849,8 @@ else
|
|||
echo "acl mode, skipping deploy phase"
|
||||
rm -rf ${BASEPATH}/output/_CPack_Packages/
|
||||
else
|
||||
cp -rf ${BUILD_PATH}/package/mindspore/lib ${BUILD_PATH}/../mindspore
|
||||
cp -rf ${BUILD_PATH}/package/mindspore/*.so ${BUILD_PATH}/../mindspore
|
||||
cp -rf ${BUILD_PATH}/package/mindspore/lib ${BASEPATH}/mindspore
|
||||
cp -rf ${BUILD_PATH}/package/mindspore/*.so ${BASEPATH}/mindspore
|
||||
fi
|
||||
fi
|
||||
echo "---------------- MindSpore: build end ----------------"
|
||||
|
|
|
@ -8,8 +8,10 @@ set(CPACK_GENERATOR "External")
|
|||
set(CPACK_CMAKE_GENERATOR "Ninja")
|
||||
set(CPACK_EXTERNAL_PACKAGE_SCRIPT ${CMAKE_SOURCE_DIR}/cmake/package_script.cmake)
|
||||
set(CPACK_EXTERNAL_ENABLE_STAGING true)
|
||||
set(CPACK_TEMPORARY_PACKAGE_FILE_NAME ${CMAKE_SOURCE_DIR}/build/package/mindspore)
|
||||
set(CPACK_TEMPORARY_INSTALL_DIRECTORY ${CMAKE_SOURCE_DIR}/build/package/mindspore)
|
||||
set(CPACK_TEMPORARY_PACKAGE_FILE_NAME ${BUILD_PATH}/package/mindspore)
|
||||
set(CPACK_TEMPORARY_INSTALL_DIRECTORY ${BUILD_PATH}/package/mindspore)
|
||||
set(CPACK_PACK_ROOT_DIR ${BUILD_PATH}/package/)
|
||||
set(CPACK_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
||||
if(ENABLE_GE)
|
||||
set(CPACK_MS_BACKEND "ge")
|
||||
set(CPACK_MS_TARGET "ascend or cpu")
|
||||
|
@ -210,7 +212,7 @@ if(NOT ENABLE_GE)
|
|||
install(
|
||||
FILES
|
||||
${CMAKE_BINARY_DIR}/graphengine/metadef/graph/libgraph.so
|
||||
${CMAKE_SOURCE_DIR}/build/graphengine/c_sec/lib/libc_sec.so
|
||||
${BUILD_PATH}/graphengine/c_sec/lib/libc_sec.so
|
||||
DESTINATION ${INSTALL_LIB_DIR}
|
||||
COMPONENT mindspore
|
||||
)
|
||||
|
@ -274,7 +276,7 @@ install(
|
|||
)
|
||||
|
||||
if((ENABLE_D OR ENABLE_GPU) AND ENABLE_AKG)
|
||||
set (AKG_PATH ${CMAKE_SOURCE_DIR}/build/mindspore/akg)
|
||||
set (AKG_PATH ${BUILD_PATH}/mindspore/akg)
|
||||
file(REMOVE_RECURSE ${AKG_PATH}/_akg)
|
||||
file(MAKE_DIRECTORY ${AKG_PATH}/_akg)
|
||||
file(TOUCH ${AKG_PATH}/_akg/__init__.py)
|
||||
|
|
|
@ -19,8 +19,8 @@ endif()
|
|||
set(GIT ${GIT_EXECUTABLE})
|
||||
|
||||
# set path
|
||||
set(MS_ROOT_DIR ${CPACK_PACKAGE_DIRECTORY}/../../)
|
||||
set(MS_PACK_ROOT_DIR ${MS_ROOT_DIR}/build/package)
|
||||
set(MS_ROOT_DIR ${CPACK_CMAKE_SOURCE_DIR})
|
||||
set(MS_PACK_ROOT_DIR ${CPACK_PACK_ROOT_DIR})
|
||||
|
||||
# set package file name
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
|
|
@ -10,6 +10,8 @@ set(CPACK_EXTERNAL_PACKAGE_SCRIPT ${CMAKE_SOURCE_DIR}/cmake/package_script.cmake
|
|||
set(CPACK_EXTERNAL_ENABLE_STAGING true)
|
||||
set(CPACK_TEMPORARY_PACKAGE_FILE_NAME ${CMAKE_SOURCE_DIR}/build/package/mindspore)
|
||||
set(CPACK_TEMPORARY_INSTALL_DIRECTORY ${CMAKE_SOURCE_DIR}/build/package/mindspore)
|
||||
set(CPACK_PACK_ROOT_DIR ${BUILD_PATH}/package/)
|
||||
set(CPACK_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
||||
|
||||
if(ENABLE_GPU)
|
||||
set(CPACK_MS_BACKEND "ms")
|
||||
|
|
|
@ -17,7 +17,7 @@ if(ENABLE_CPU)
|
|||
if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "aarch64")
|
||||
set(PLATFORM_ARM64 "on")
|
||||
set(X86_64_SIMD "off")
|
||||
elseif("${X86_64_SIMD}" STREQUAL "off")
|
||||
elseif("${X86_64_SIMD}" STREQUAL "off" AND NOT ${ENABLE_ASAN})
|
||||
set(X86_64_SIMD "avx")
|
||||
endif()
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/backend/kernel_compiler/cpu)
|
||||
|
|
3
setup.py
3
setup.py
|
@ -27,9 +27,10 @@ backend_policy = os.getenv('BACKEND_POLICY')
|
|||
device_target = os.getenv('BACKEND_TARGET')
|
||||
commit_id = os.getenv('COMMIT_ID').replace("\n", "")
|
||||
package_name = os.getenv('MS_PACKAGE_NAME').replace("\n", "")
|
||||
build_path = os.getenv('BUILD_PATH')
|
||||
|
||||
pwd = os.path.dirname(os.path.realpath(__file__))
|
||||
pkg_dir = os.path.join(pwd, 'build/package')
|
||||
pkg_dir = os.path.join(build_path, 'package')
|
||||
|
||||
|
||||
def _read_file(filename):
|
||||
|
|
Loading…
Reference in New Issue