From a1428987663e60b7b847a3797053ac994947ea89 Mon Sep 17 00:00:00 2001 From: Manu Seth <22492939+mseth10@users.noreply.github.com> Date: Tue, 6 Jul 2021 12:35:03 -0700 Subject: [PATCH] [v1.x] use centos7 base image for aarch64 build (#20392) * add centos7 aarch64 build * enable rh packages * update openssl curl version * install rhel7 armpl * find armpl cmake * test mkldnn build * test ninja * use armpl compiled with gcc-8 * enable py38 for unittests * check previously failing tests * create symlink for ninja * fix cd pypi * fix cd docker * update ssl for mac --- cd/mxnet_lib/Jenkins_pipeline.groovy | 2 +- cd/mxnet_lib/mxnet_lib_pipeline.groovy | 2 +- cd/python/docker/Dockerfile | 6 +- cd/python/docker/Jenkins_pipeline.groovy | 2 +- cd/python/pypi/Jenkins_pipeline.groovy | 4 +- .../Dockerfile.build.centos7_aarch64_cpu | 111 ++++++++++++++++++ .../Dockerfile.publish.ubuntu1804_aarch64_cpu | 39 ------ ci/docker/install/requirements_aarch64 | 2 - ci/docker/install/ubuntu_aarch64_publish.sh | 93 --------------- ci/docker/runtime_functions.sh | 24 +++- cmake/Modules/FindArmPL.cmake | 4 +- tests/python/unittest/test_ndarray.py | 3 - .../unittest/test_numpy_interoperability.py | 2 - tests/python/unittest/test_numpy_op.py | 2 - tests/python/unittest/test_profiler.py | 4 +- tools/dependencies/curl.sh | 6 +- tools/dependencies/openssl.sh | 2 +- tools/staticbuild/build_lib_cmake.sh | 6 +- 18 files changed, 150 insertions(+), 164 deletions(-) create mode 100644 ci/docker/Dockerfile.build.centos7_aarch64_cpu delete mode 100644 ci/docker/Dockerfile.publish.ubuntu1804_aarch64_cpu delete mode 100755 ci/docker/install/ubuntu_aarch64_publish.sh diff --git a/cd/mxnet_lib/Jenkins_pipeline.groovy b/cd/mxnet_lib/Jenkins_pipeline.groovy index f34988d1d1f1..ac372c621206 100644 --- a/cd/mxnet_lib/Jenkins_pipeline.groovy +++ b/cd/mxnet_lib/Jenkins_pipeline.groovy @@ -47,7 +47,7 @@ def build(mxnet_variant) { node(NODE_LINUX_AARCH64_CPU) { ws("workspace/mxnet_${libtype}/${mxnet_variant}/${env.BUILD_NUMBER}") { ci_utils.init_git() - ci_utils.docker_run('publish.ubuntu1804_aarch64_cpu', "build_static_libmxnet ${mxnet_variant}", false) + ci_utils.docker_run('centos7_aarch64_cpu', "build_static_libmxnet ${mxnet_variant}", false) ci_utils.pack_lib("mxnet_${mxnet_variant}", libmxnet_pipeline.get_stash(mxnet_variant)) } } diff --git a/cd/mxnet_lib/mxnet_lib_pipeline.groovy b/cd/mxnet_lib/mxnet_lib_pipeline.groovy index 5ca1bb1c6d00..9c154a911f97 100644 --- a/cd/mxnet_lib/mxnet_lib_pipeline.groovy +++ b/cd/mxnet_lib/mxnet_lib_pipeline.groovy @@ -76,7 +76,7 @@ def get_stash(mxnet_variant) { // The environment corresponds to the docker files in the 'docker' directory def get_environment(mxnet_variant) { if (mxnet_variant.startsWith("aarch64")) { - return "publish.ubuntu1804_aarch64_cpu" + return "centos7_aarch64_cpu" } else if (mxnet_variant.startsWith("cu")) { // Remove 'mkl' suffix from variant to properly format test environment return "ubuntu_gpu_${mxnet_variant.replace('mkl', '')}" diff --git a/cd/python/docker/Dockerfile b/cd/python/docker/Dockerfile index 28d85cff1f11..16d20832eb0c 100644 --- a/cd/python/docker/Dockerfile +++ b/cd/python/docker/Dockerfile @@ -36,12 +36,12 @@ RUN apt-get install -y libgomp1 ARG MXNET_VARIANT RUN if [ "$MXNET_VARIANT" = "aarch64_cpu" ] ; then echo "not installing libquadmath0 on aarch64" ; else apt-get install -y libquadmath0 ; fi -RUN if [ "$MXNET_VARIANT" = "aarch64_cpu" ] ; \ - then wget https://armkeil.blob.core.windows.net/developer/Files/downloads/hpc/arm-performance-libraries/21-0-0/Ubuntu18.04/arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2.tar && \ +RUN if [ "$MXNET_VARIANT" = "aarch64_cpu" ] ; then \ + wget https://armkeil.blob.core.windows.net/developer/Files/downloads/hpc/arm-performance-libraries/21-0-0/Ubuntu18.04/arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2.tar && \ tar -xvf arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2.tar && \ arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2/arm-performance-libraries_21.0_Ubuntu-18.04.sh -a; \ fi -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/arm/armpl_21.0_gcc-8.2/lib/ +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/arm/armpl_21.0_gcc-8.2/lib ARG MXNET_COMMIT_ID ENV MXNET_COMMIT_ID=${MXNET_COMMIT_ID} diff --git a/cd/python/docker/Jenkins_pipeline.groovy b/cd/python/docker/Jenkins_pipeline.groovy index bf3df36556b6..46fc64714cc3 100644 --- a/cd/python/docker/Jenkins_pipeline.groovy +++ b/cd/python/docker/Jenkins_pipeline.groovy @@ -42,7 +42,7 @@ def get_pipeline(mxnet_variant) { // The environment corresponds to the docker files in the 'docker' directory def get_environment(mxnet_variant) { if (mxnet_variant.startsWith('aarch64')) { - return "publish.ubuntu1804_aarch64_cpu" + return "centos7_aarch64_cpu" } if (mxnet_variant.startsWith('cu')) { return "ubuntu_gpu_${mxnet_variant}" diff --git a/cd/python/pypi/Jenkins_pipeline.groovy b/cd/python/pypi/Jenkins_pipeline.groovy index dfb3018b4500..8b2d37ff3090 100644 --- a/cd/python/pypi/Jenkins_pipeline.groovy +++ b/cd/python/pypi/Jenkins_pipeline.groovy @@ -48,7 +48,7 @@ def get_pipeline(mxnet_variant) { // The environment corresponds to the docker files in the 'docker' directory def get_environment(mxnet_variant) { if (mxnet_variant.startsWith('aarch64')) { - return "publish.ubuntu1804_aarch64_cpu" + return "centos7_aarch64_cpu" } if (mxnet_variant.startsWith('cu')) { return "ubuntu_gpu_${mxnet_variant}" @@ -73,7 +73,7 @@ def test(mxnet_variant) { // test wheel file def environment = get_environment(mxnet_variant) def nvidia_docker = mxnet_variant.startsWith('cu') - ci_utils.docker_run(environment, "cd_integration_test_pypi python3 ${nvidia_docker}", nvidia_docker) + ci_utils.docker_run(environment, "cd_integration_test_pypi ${mxnet_variant} ${nvidia_docker}", nvidia_docker) } } diff --git a/ci/docker/Dockerfile.build.centos7_aarch64_cpu b/ci/docker/Dockerfile.build.centos7_aarch64_cpu new file mode 100644 index 000000000000..36415107ae6e --- /dev/null +++ b/ci/docker/Dockerfile.build.centos7_aarch64_cpu @@ -0,0 +1,111 @@ +# -*- mode: dockerfile -*- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Dockerfile for CentOS 7 AArch64 CPU build. +# Via the CentOS 7 Dockerfiles, we ensure MXNet continues to run fine on older systems. + +FROM arm64v8/centos:7 + +WORKDIR /work/deps + +RUN yum -y check-update || true && \ + yum -y install epel-release centos-release-scl centos-release-scl-rh && \ + yum install -y \ + # Utilities + wget \ + unzip \ + patchelf \ + pandoc \ + # Development tools + git \ + make \ + ninja-build \ + automake \ + autoconf \ + libtool \ + protobuf-compiler \ + protobuf-devel \ + # CentOS Software Collections https://www.softwarecollections.org + devtoolset-10 \ + devtoolset-10-gcc \ + devtoolset-10-gcc-c++ \ + devtoolset-10-gcc-gfortran \ + rh-python38 \ + rh-python38-python-numpy \ + rh-python38-python-scipy \ + # Libraries + opencv-devel \ + openssl-devel \ + zeromq-devel \ + # Build-dependencies for ccache 3.7.9 + gperf \ + libb2-devel \ + libzstd-devel && \ + yum clean all + +# Make Red Hat Developer Toolset 10.0 and Python 3.8 Software Collections available by default +# during the following build steps in this Dockerfile +SHELL [ "/usr/bin/scl", "enable", "devtoolset-10", "rh-python38" ] + +# Install minimum required cmake version +RUN cd /usr/local/src && \ + wget -nv https://cmake.org/files/v3.20/cmake-3.20.5-linux-aarch64.sh && \ + sh cmake-3.20.5-linux-aarch64.sh --prefix=/usr/local --skip-license && \ + rm cmake-3.20.5-linux-aarch64.sh + +# ccache 3.7.9 has fixes for caching nvcc outputs +RUN cd /usr/local/src && \ + git clone --recursive https://github.com/ccache/ccache.git && \ + cd ccache && \ + git checkout v3.7.9 && \ + ./autogen.sh && \ + ./configure --disable-man && \ + make -j$(nproc) && \ + make install && \ + cd /usr/local/src && \ + rm -rf ccache + +# Arm Performance Libraries 21.0 +RUN cd /usr/local/src && \ + wget https://armkeil.blob.core.windows.net/developer/Files/downloads/hpc/arm-performance-libraries/21-0-0/RHEL7/arm-performance-libraries_21.0_RHEL-7_gcc-8.2.tar && \ + tar -xvf arm-performance-libraries_21.0_RHEL-7_gcc-8.2.tar && \ + arm-performance-libraries_21.0_RHEL-7_gcc-8.2/arm-performance-libraries_21.0_RHEL-7.sh -a && \ + rm -rf arm-performance-libraries_21.0_RHEL-7_gcc-8.2.tar arm-performance-libraries_21.0_RHEL-7_gcc-8.2 +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/arm/armpl_21.0_gcc-8.2/lib + +# Fix the en_DK.UTF-8 locale to test locale invariance +RUN localedef -i en_DK -f UTF-8 en_DK.UTF-8 + +# Python dependencies +RUN python3 -m pip install --upgrade pip +COPY install/requirements_aarch64 /work/ +RUN python3 -m pip install -r /work/requirements_aarch64 + +ARG USER_ID=0 +COPY install/centos7_adduser.sh /work/ +RUN /work/centos7_adduser.sh + +ENV PYTHONPATH=./python/ +# Verify that MXNet works correctly when the C locale is set to a locale that uses a comma as the +# decimal separator. Please see #16134 for an example of a bug caused by incorrect handling of +# number serialization and deserialization. +ENV LC_NUMERIC=en_DK.UTF-8 +WORKDIR /work/mxnet + +COPY runtime_functions.sh /work/ + diff --git a/ci/docker/Dockerfile.publish.ubuntu1804_aarch64_cpu b/ci/docker/Dockerfile.publish.ubuntu1804_aarch64_cpu deleted file mode 100644 index f4da407fc7d8..000000000000 --- a/ci/docker/Dockerfile.publish.ubuntu1804_aarch64_cpu +++ /dev/null @@ -1,39 +0,0 @@ -# -*- mode: dockerfile -*- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Dockerfile to build and run MXNet on Ubuntu 18.04 for CPU - -FROM arm64v8/ubuntu:18.04 - -WORKDIR /work/deps - -COPY install/ubuntu_aarch64_publish.sh /work/ -RUN /work/ubuntu_aarch64_publish.sh -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/arm/armpl_21.0_gcc-8.2/lib/ -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/gcc-8.5.0/lib64 -ENV PATH=${PATH}:/usr/local/gcc-8.5.0/bin - -ARG USER_ID=0 -ARG GROUP_ID=0 -COPY install/ubuntu_adduser.sh /work/ -RUN /work/ubuntu_adduser.sh - -COPY runtime_functions.sh /work/ - -WORKDIR /work/mxnet -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib diff --git a/ci/docker/install/requirements_aarch64 b/ci/docker/install/requirements_aarch64 index c3662196a2fd..327a78f7d960 100644 --- a/ci/docker/install/requirements_aarch64 +++ b/ci/docker/install/requirements_aarch64 @@ -25,10 +25,8 @@ decorator==4.4.0 mock==2.0.0 nose==1.3.7 nose-timer==0.7.3 -numpy pylint==2.3.1 # pylint and astroid need to be aligned astroid==2.3.3 # pylint and astroid need to be aligned requests<2.19.0,>=2.18.4 -scipy setuptools coverage diff --git a/ci/docker/install/ubuntu_aarch64_publish.sh b/ci/docker/install/ubuntu_aarch64_publish.sh deleted file mode 100755 index 78165265187f..000000000000 --- a/ci/docker/install/ubuntu_aarch64_publish.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Build on Ubuntu 18.04 LTS for LINUX CPU/GPU -set -ex - -apt-get update -apt-get install -y software-properties-common -add-apt-repository ppa:ubuntu-toolchain-r/test -y -add-apt-repository ppa:openjdk-r/ppa -y # Java lib -apt-get update -apt-get install -y git \ - build-essential \ - ninja-build \ - libssl-dev \ - libcurl4-openssl-dev \ - ccache \ - unzip \ - libtool \ - curl \ - wget \ - sudo \ - gnupg \ - gnupg2 \ - gnupg-agent \ - libc6-lse \ - pandoc \ - python3 \ - python3-pip \ - automake \ - pkg-config \ - openjdk-8-jdk \ - patchelf - -# build gcc-8.5 from source -apt update -apt install -y flex bison -wget https://ftpmirror.gnu.org/gcc/gcc-8.5.0/gcc-8.5.0.tar.xz -tar xf gcc-8.5.0.tar.xz -cd gcc-8.5.0/ -sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/' -contrib/download_prerequisites -cd .. -mkdir build && cd build -../gcc-8.5.0/configure -v --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --prefix=/usr/local/gcc-8.5.0 --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib --program-suffix=-8.5 -make -j$(nproc) -sudo make install-strip -cd .. -rm -rf gcc-8.5.0.tar.xz -update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-8.5.0/bin/gcc-8.5 100 --slave /usr/bin/g++ g++ /usr/local/gcc-8.5.0/bin/g++-8.5 --slave /usr/bin/gcov gcov /usr/local/gcc-8.5.0/bin/gcov-8.5 --slave /usr/bin/gfortran gfortran /usr/local/gcc-8.5.0/bin/gfortran-8.5 - -curl -o apache-maven-3.3.9-bin.tar.gz -L http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \ - || curl -o apache-maven-3.3.9-bin.tar.gz -L https://search.maven.org/remotecontent?filepath=org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.tar.gz - -tar xzf apache-maven-3.3.9-bin.tar.gz -mkdir /usr/local/maven -mv apache-maven-3.3.9/ /usr/local/maven/ -update-alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn 1 -update-ca-certificates -f - -# the version of the pip shipped with ubuntu may be too lower, install a recent version here -python3 -m pip install --upgrade pip - -python3 -m pip install --upgrade --ignore-installed nose cpplint==1.3.0 pylint==2.3.1 nose-timer 'numpy<2.0.0,>1.16.0' 'requests<3,>=2.20.0' scipy boto3 - -# CMake 3.13.2+ is required -wget https://github.com/Kitware/CMake/releases/download/v3.16.5/cmake-3.16.5.tar.gz -tar -zxvf cmake-3.16.5.tar.gz -cd cmake-3.16.5 -./bootstrap -make -j$(nproc) -sudo make install - -# Download and set up Arm Performance Libraries -wget https://armkeil.blob.core.windows.net/developer/Files/downloads/hpc/arm-performance-libraries/21-0-0/Ubuntu18.04/arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2.tar -tar -xvf arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2.tar -arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2/arm-performance-libraries_21.0_Ubuntu-18.04.sh -a diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 156264aaaea5..8e1d31d6a0c5 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -984,6 +984,10 @@ cd_unittest_ubuntu() { local nose_cmd="nosetests-3.4" + if [[ ${mxnet_variant} = aarch64_cpu ]]; then + source /opt/rh/rh-python38/enable + fi + $nose_cmd $NOSE_TIMER_ARGUMENTS --verbose tests/python/unittest $nose_cmd $NOSE_TIMER_ARGUMENTS --verbose tests/python/quantization @@ -2007,6 +2011,9 @@ build_static_libmxnet() { set -ex pushd . local mxnet_variant=${1:?"This function requires a python command as the first argument"} + if [[ ${mxnet_variant} = aarch64_cpu ]]; then + source /opt/rh/devtoolset-10/enable + fi CMAKE_STATICBUILD=1 source tools/staticbuild/build.sh ${mxnet_variant} popd @@ -2017,6 +2024,9 @@ cd_package_pypi() { set -ex pushd . local mxnet_variant=${1:?"This function requires a python command as the first argument"} + if [[ ${mxnet_variant} = aarch64_cpu ]]; then + source /opt/rh/rh-python38/enable + fi ./cd/python/pypi/pypi_package.sh ${mxnet_variant} popd } @@ -2024,25 +2034,27 @@ cd_package_pypi() { # Sanity checks wheel file cd_integration_test_pypi() { set -ex - local python_cmd=${1:?"This function requires a python command as the first argument"} + local mxnet_variant=${1:?"This function requires a python command as the first argument"} local gpu_enabled=${2:-"false"} local test_conv_params='' local mnist_params='' - local pip_cmd='pip3' - if [ "${gpu_enabled}" = "true" ]; then mnist_params="--gpu 0" test_conv_params="--gpu" fi + if [[ ${mxnet_variant} = aarch64_cpu ]]; then + source /opt/rh/rh-python38/enable + fi + # install mxnet wheel package - ${pip_cmd} install --user ./wheel_build/dist/*.whl + python3 -m pip install --user ./wheel_build/dist/*.whl # execute tests - ${python_cmd} /work/mxnet/tests/python/train/test_conv.py ${test_conv_params} - ${python_cmd} /work/mxnet/example/image-classification/train_mnist.py ${mnist_params} + python3 /work/mxnet/tests/python/train/test_conv.py ${test_conv_params} + python3 /work/mxnet/example/image-classification/train_mnist.py ${mnist_params} } # Publishes wheel to PyPI diff --git a/cmake/Modules/FindArmPL.cmake b/cmake/Modules/FindArmPL.cmake index 5ff4e44832c6..49d8e096d74a 100644 --- a/cmake/Modules/FindArmPL.cmake +++ b/cmake/Modules/FindArmPL.cmake @@ -42,8 +42,8 @@ SET(ArmPL_LIBRARIES ${ArmPL_LIB} ${MATH_LIB} ${STRING_LIB} - /usr/local/gcc-8.5.0/lib64/libgfortran.so - /usr/lib/aarch64-linux-gnu/libm.so + libgfortran.so + libm.so ) SET(ArmPL_FOUND ON) diff --git a/tests/python/unittest/test_ndarray.py b/tests/python/unittest/test_ndarray.py index 3f93cbe30284..c8fbf35065b7 100644 --- a/tests/python/unittest/test_ndarray.py +++ b/tests/python/unittest/test_ndarray.py @@ -31,13 +31,11 @@ from mxnet.test_utils import np_reduce from mxnet.test_utils import same from mxnet.test_utils import random_sample, rand_shape_nd, random_arrays -from mxnet.test_utils import is_aarch64_run from mxnet import runtime from numpy.testing import assert_allclose, assert_array_equal, assert_array_almost_equal import mxnet.autograd from mxnet.base import integer_types from mxnet.ndarray.ndarray import py_slice -import unittest def check_with_uniform(uf, arg_shapes, dim=None, npuf=None, rmin=-10, type_list=[np.float32]): @@ -1285,7 +1283,6 @@ def test_output(): @with_seed() -@unittest.skipIf(is_aarch64_run(), "test fails on aarch64 - tracked in #20289") def test_ndarray_fluent(): has_grad = set(['flatten', 'expand_dims', 'flip', 'tile', 'transpose', 'sum', 'nansum', 'prod', 'nanprod', 'mean', 'max', 'min', 'reshape', 'broadcast_to', 'split', 'split_v2', diff --git a/tests/python/unittest/test_numpy_interoperability.py b/tests/python/unittest/test_numpy_interoperability.py index 63e74c746d5b..fd8abf1849be 100644 --- a/tests/python/unittest/test_numpy_interoperability.py +++ b/tests/python/unittest/test_numpy_interoperability.py @@ -28,7 +28,6 @@ from mxnet.test_utils import assert_almost_equal from mxnet.test_utils import use_np from mxnet.test_utils import is_op_runnable -from mxnet.test_utils import is_aarch64_run from common import assertRaises, with_seed, random_seed, setup_module, teardown from mxnet.numpy_dispatch_protocol import with_array_function_protocol, with_array_ufunc_protocol from mxnet.numpy_dispatch_protocol import _NUMPY_ARRAY_FUNCTION_LIST, _NUMPY_ARRAY_UFUNC_LIST @@ -3067,7 +3066,6 @@ def test_np_memory_array_function(): @with_seed() @use_np -@unittest.skipIf(is_aarch64_run(), "test fails on aarch64 - tracked in #20289") @with_array_function_protocol def test_np_array_function_protocol(): check_interoperability(_NUMPY_ARRAY_FUNCTION_LIST) diff --git a/tests/python/unittest/test_numpy_op.py b/tests/python/unittest/test_numpy_op.py index 6833cd3fb765..add0620be71d 100644 --- a/tests/python/unittest/test_numpy_op.py +++ b/tests/python/unittest/test_numpy_op.py @@ -34,7 +34,6 @@ from mxnet.test_utils import check_numeric_gradient, use_np, collapse_sum_like, effective_dtype from mxnet.test_utils import new_matrix_with_real_eigvals_nd from mxnet.test_utils import new_sym_matrix_with_real_eigvals_nd -from mxnet.test_utils import is_aarch64_run from common import assertRaises, with_seed import random from mxnet.test_utils import verify_generator, gen_buckets_probs_with_ppf @@ -3575,7 +3574,6 @@ def hybrid_forward(self, F, x): @with_seed() @use_np -@unittest.skipIf(is_aarch64_run(), "test fails on aarch64 - tracked in #20289") def test_np_delete(): class TestDelete(HybridBlock): def __init__(self, obj, axis=None): diff --git a/tests/python/unittest/test_profiler.py b/tests/python/unittest/test_profiler.py index 8e8209f5235b..ae7352c19301 100644 --- a/tests/python/unittest/test_profiler.py +++ b/tests/python/unittest/test_profiler.py @@ -61,10 +61,10 @@ def test_profiler(): for i in range(iter_num): if i == begin_profiling_iter: - t0 = time.clock() + t0 = time.process_time() profiler.set_state('run') if i == end_profiling_iter: - t1 = time.clock() + t1 = time.process_time() profiler.set_state('stop') executor.forward() c = executor.outputs[0] diff --git a/tools/dependencies/curl.sh b/tools/dependencies/curl.sh index 8e546146eeaa..948d4a2ae088 100755 --- a/tools/dependencies/curl.sh +++ b/tools/dependencies/curl.sh @@ -19,7 +19,7 @@ # This script builds the static library of libcurl that can be used as dependency of mxnet. set -ex -LIBCURL_VERSION=7.61.0 +LIBCURL_VERSION=7.77.0 if [[ ! -f $DEPS_PATH/lib/libcurl.a ]]; then # download and build libcurl >&2 echo "Building libcurl..." @@ -30,9 +30,9 @@ if [[ ! -f $DEPS_PATH/lib/libcurl.a ]]; then pushd . cd $DEPS_PATH/curl-$LIBCURL_VERSION if [[ $PLATFORM == 'linux' ]]; then - CONFIG_FLAG="" + CONFIG_FLAG="--with-openssl" elif [[ $PLATFORM == 'darwin' ]]; then - CONFIG_FLAG="--with-darwinssl" + CONFIG_FLAG="--with-secure-transport" fi ./configure $CONFIG_FLAG \ --with-zlib \ diff --git a/tools/dependencies/openssl.sh b/tools/dependencies/openssl.sh index 9709825d7e4a..697c73518308 100755 --- a/tools/dependencies/openssl.sh +++ b/tools/dependencies/openssl.sh @@ -19,7 +19,7 @@ # This script builds the static library of openssl that can be used as dependency of mxnet. set -ex -OPENSSL_VERSION=1.1.1b +OPENSSL_VERSION=1.1.1k if [[ ! -f $DEPS_PATH/lib/libssl.a ]] || [[ ! -f $DEPS_PATH/lib/libcrypto.a ]]; then # download and build openssl >&2 echo "Building openssl..." diff --git a/tools/staticbuild/build_lib_cmake.sh b/tools/staticbuild/build_lib_cmake.sh index a29c393f9a9f..e6c14e4bb7a7 100755 --- a/tools/staticbuild/build_lib_cmake.sh +++ b/tools/staticbuild/build_lib_cmake.sh @@ -32,7 +32,11 @@ git submodule update --init --recursive || true # Build libmxnet.so rm -rf build; mkdir build; cd build cmake -GNinja -C $cmake_config -DCMAKE_PREFIX_PATH=${DEPS_PATH} -DCMAKE_FIND_ROOT_PATH=${DEPS_PATH} .. -ninja +if [[ ! $ARCH == 'aarch64' ]]; then + ninja +else + ninja-build +fi cd - # Move to lib