提交 71cc814e 编写于 作者: M Megvii Engine Team

feat(ci): add aarch64 linux ci

GitOrigin-RevId: 2c0d3a8cc29745e4bceb3bd570a7e67bd1b8b651
上级 31a1f538
......@@ -56,6 +56,9 @@ if (MGE_WITH_CUDA)
target_link_libraries(megdnn_test cutlass)
target_include_directories(megdnn_test PRIVATE ${CUDNN_INCLUDE_DIR})
endif()
if(MGE_WITH_ATLAS)
target_link_libraries(megdnn_test atlas-stub)
endif()
target_include_directories(megdnn_test
......
......@@ -24,6 +24,15 @@ if [[ "$TEST_PLAT" =~ "local" ]]; then
cd $(dirname "${BASH_SOURCE[0]}")
megengine_dir=`python3 -c 'from pathlib import Path;import megengine;print(Path(megengine.__file__).resolve().parent)'`
test_dirs="${megengine_dir} ."
# FIXME: at aarch64 env, run megengine_dir pytest have exit issue!!
machine=$(uname -m)
case ${machine} in
x86_64) test_dirs="${megengine_dir} ." ;;
aarch64) test_dirs="." ;;
*) echo "nonsupport env!!!";exit -1 ;;
esac
echo "test local env at: ${test_dirs}"
PY_IGNORE_IMPORTMISMATCH=1 python3 -m pytest -v $test_dirs -m 'not isolated_distributed'
if [[ "$TEST_PLAT" =~ "cuda" ]]; then
......
......@@ -13,6 +13,10 @@ CUDA_LIB_DIR="/usr/local/cuda/lib64/"
SDK_NAME="unknown"
x86_64_support_version="cu101 cu111 cu112 cpu"
aarch64_support_version="cu111 cpu"
if [[ -z ${IN_CI} ]]
then
IN_CI="false"
fi
function usage() {
echo "use -sdk sdk_version to specify sdk toolkit config!"
echo "now x86_64 sdk_version support ${x86_64_support_version}"
......@@ -91,13 +95,18 @@ elif [ $SDK_NAME == "cu111" ];then
${CUDNN_LIB_DIR}/libcudnn_ops_train.so.8:\
${CUDNN_LIB_DIR}/libcudnn.so.8"
EXTRA_CMAKE_FLAG=" -DMGE_WITH_CUDNN_SHARED=ON -DMGE_WITH_CUBLAS_SHARED=ON \
-DMGE_CUDA_GENCODE=\"-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_70,code=sm_70 \
-gencode arch=compute_75,code=sm_75 \
-gencode arch=compute_80,code=sm_80 \
-gencode arch=compute_86,code=sm_86 \
-gencode arch=compute_86,code=compute_86\" "
if [ ${IN_CI} = "true" ] && [ ${machine} == "aarch64" ]; then
EXTRA_CMAKE_FLAG=" -DMGE_WITH_CUDNN_SHARED=ON -DMGE_WITH_CUBLAS_SHARED=ON \
-DMGE_WITH_TEST=ON -DMGE_CUDA_GENCODE=\"-gencode arch=compute_75,code=sm_75\" "
else
EXTRA_CMAKE_FLAG=" -DMGE_WITH_CUDNN_SHARED=ON -DMGE_WITH_CUBLAS_SHARED=ON \
-DMGE_CUDA_GENCODE=\"-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_70,code=sm_70 \
-gencode arch=compute_75,code=sm_75 \
-gencode arch=compute_80,code=sm_80 \
-gencode arch=compute_86,code=sm_86 \
-gencode arch=compute_86,code=compute_86\" "
fi
elif [ $SDK_NAME == "cu112" ];then
CUDA_COPY_LIB_LIST="\
......@@ -267,7 +276,14 @@ else
run_cmd="/home/code/scripts/whl/manylinux2014/do_build_common.sh"
fi
set +x
docker run --rm -it $TMPFS_ARGS \
docker_args="-it"
if [ -z "${CI_SERVER_NAME}" ]; then
Target="null"
fi
if [ ${CI_SERVER_NAME} = "GitLab" ];then
docker_args="-i"
fi
docker run --rm ${docker_args} $TMPFS_ARGS \
-e UID=${USERID} \
-e PUBLIC_VERSION_POSTFIX=${PUBLIC_VERSION_POSTFIX} \
-e LOCAL_VERSION=${LOCAL_VERSION} \
......
......@@ -98,7 +98,6 @@ function check_python_version_is_valid() {
echo "err call check_python_version_is_valid"
exit -1
fi
is_valid="false"
for i_want_build_version in ${want_build_version}
do
is_valid="false"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册