Browse Source

feat(ci): add aarch64 linux ci

GitOrigin-RevId: 2c0d3a8cc2
release-1.5
Megvii Engine Team 4 years ago
parent
commit
71cc814eaf
4 changed files with 36 additions and 9 deletions
  1. +3
    -0
      dnn/test/CMakeLists.txt
  2. +9
    -0
      imperative/python/test/run.sh
  3. +24
    -8
      scripts/whl/manylinux2014/build_wheel_common.sh
  4. +0
    -1
      scripts/whl/utils/utils.sh

+ 3
- 0
dnn/test/CMakeLists.txt View File

@@ -56,6 +56,9 @@ if (MGE_WITH_CUDA)
target_link_libraries(megdnn_test cutlass) target_link_libraries(megdnn_test cutlass)
target_include_directories(megdnn_test PRIVATE ${CUDNN_INCLUDE_DIR}) target_include_directories(megdnn_test PRIVATE ${CUDNN_INCLUDE_DIR})
endif() endif()
if(MGE_WITH_ATLAS)
target_link_libraries(megdnn_test atlas-stub)
endif()




target_include_directories(megdnn_test target_include_directories(megdnn_test


+ 9
- 0
imperative/python/test/run.sh View File

@@ -24,6 +24,15 @@ if [[ "$TEST_PLAT" =~ "local" ]]; then
cd $(dirname "${BASH_SOURCE[0]}") cd $(dirname "${BASH_SOURCE[0]}")
megengine_dir=`python3 -c 'from pathlib import Path;import megengine;print(Path(megengine.__file__).resolve().parent)'` megengine_dir=`python3 -c 'from pathlib import Path;import megengine;print(Path(megengine.__file__).resolve().parent)'`
test_dirs="${megengine_dir} ." 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}" echo "test local env at: ${test_dirs}"
PY_IGNORE_IMPORTMISMATCH=1 python3 -m pytest -v $test_dirs -m 'not isolated_distributed' PY_IGNORE_IMPORTMISMATCH=1 python3 -m pytest -v $test_dirs -m 'not isolated_distributed'
if [[ "$TEST_PLAT" =~ "cuda" ]]; then if [[ "$TEST_PLAT" =~ "cuda" ]]; then


+ 24
- 8
scripts/whl/manylinux2014/build_wheel_common.sh View File

@@ -13,6 +13,10 @@ CUDA_LIB_DIR="/usr/local/cuda/lib64/"
SDK_NAME="unknown" SDK_NAME="unknown"
x86_64_support_version="cu101 cu111 cu112 cpu" x86_64_support_version="cu101 cu111 cu112 cpu"
aarch64_support_version="cu111 cpu" aarch64_support_version="cu111 cpu"
if [[ -z ${IN_CI} ]]
then
IN_CI="false"
fi
function usage() { function usage() {
echo "use -sdk sdk_version to specify sdk toolkit config!" echo "use -sdk sdk_version to specify sdk toolkit config!"
echo "now x86_64 sdk_version support ${x86_64_support_version}" 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_ops_train.so.8:\
${CUDNN_LIB_DIR}/libcudnn.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 elif [ $SDK_NAME == "cu112" ];then
CUDA_COPY_LIB_LIST="\ CUDA_COPY_LIB_LIST="\
@@ -267,7 +276,14 @@ else
run_cmd="/home/code/scripts/whl/manylinux2014/do_build_common.sh" run_cmd="/home/code/scripts/whl/manylinux2014/do_build_common.sh"
fi fi
set +x 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 UID=${USERID} \
-e PUBLIC_VERSION_POSTFIX=${PUBLIC_VERSION_POSTFIX} \ -e PUBLIC_VERSION_POSTFIX=${PUBLIC_VERSION_POSTFIX} \
-e LOCAL_VERSION=${LOCAL_VERSION} \ -e LOCAL_VERSION=${LOCAL_VERSION} \


+ 0
- 1
scripts/whl/utils/utils.sh View File

@@ -98,7 +98,6 @@ function check_python_version_is_valid() {
echo "err call check_python_version_is_valid" echo "err call check_python_version_is_valid"
exit -1 exit -1
fi fi
is_valid="false"
for i_want_build_version in ${want_build_version} for i_want_build_version in ${want_build_version}
do do
is_valid="false" is_valid="false"


Loading…
Cancel
Save