You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ma...@apache.org on 2023/06/22 23:34:00 UTC
[mxnet] 01/01: add acl support
This is an automated email from the ASF dual-hosted git repository.
manuseth pushed a commit to branch acl-build
in repository https://gitbox.apache.org/repos/asf/mxnet.git
commit 4adef653efd1fa6d4de85ef3d3dcce76a95d8b1a
Author: Ubuntu <ub...@ip-172-31-8-26.us-west-2.compute.internal>
AuthorDate: Thu Jun 22 23:33:42 2023 +0000
add acl support
---
ci/docker/Dockerfile.build.centos7_aarch64_cpu | 17 +++++-----
ci/docker/install/{requirements => centos7_acl.sh} | 37 ++++++++++------------
ci/docker/install/requirements | 1 +
config/distribution/linux_aarch64_cpu.cmake | 10 +++---
4 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/ci/docker/Dockerfile.build.centos7_aarch64_cpu b/ci/docker/Dockerfile.build.centos7_aarch64_cpu
index c4e98dc2ad..859fb6b52f 100644
--- a/ci/docker/Dockerfile.build.centos7_aarch64_cpu
+++ b/ci/docker/Dockerfile.build.centos7_aarch64_cpu
@@ -45,6 +45,12 @@ RUN yum -y check-update || true && \
devtoolset-10-gcc-c++ \
devtoolset-10-gcc-gfortran \
# Libraries
+ # protobuf-compiler \
+ # protobuf-devel \
+ # atlas-devel \
+ # lapack-devel \
+ # opencv-devel \
+ # zeromq-devel \
hdf5-devel && \
yum clean all
@@ -58,20 +64,15 @@ RUN localedef -i en_DK -f UTF-8 en_DK.UTF-8
COPY install/centos7_cmake.sh /work/
RUN /work/centos7_cmake.sh
-# 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
-
# Install Python and dependency packages
COPY install/centos7_python.sh /work/
RUN /work/centos7_python.sh
COPY install/requirements /work/
RUN pip3 install -r /work/requirements
+COPY install/centos7_acl.sh /work/
+RUN /work/centos7_acl.sh
+
ARG USER_ID=0
COPY install/centos7_adduser.sh /work/
RUN /work/centos7_adduser.sh
diff --git a/ci/docker/install/requirements b/ci/docker/install/centos7_acl.sh
old mode 100644
new mode 100755
similarity index 55%
copy from ci/docker/install/requirements
copy to ci/docker/install/centos7_acl.sh
index 482846cb2f..b38440e880
--- a/ci/docker/install/requirements
+++ b/ci/docker/install/centos7_acl.sh
@@ -1,3 +1,5 @@
+#!/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
@@ -14,24 +16,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-#
-# build and install are separated so changes to build don't invalidate
-# the whole docker cache for the image
-boto3==1.9.229
-cpplint==1.3.0
-Cython
-decorator==4.4.0
-h5py<3; platform_machine != 'aarch64'
-mock==2.0.0
-nose==1.3.7
-nose-timer==0.7.3
-# Allow numpy version as advanced as 1.19.5 to avoid CVE-2021-41495 and CVE-2021-41496 affecting <1.19.1.
-numpy>=1.16.0,<1.20.0
-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<1.7.0 # Restrict scipy version due to https://github.com/apache/mxnet/issues/20389
-setuptools
-coverage
-packaging
+set -ex
+
+pushd .
+
+yum install -y git
+
+mkdir -p /work/deps/acl
+cd /work/deps/acl
+
+git clone https://github.com/ARM-software/ComputeLibrary.git
+cd ComputeLibrary
+git checkout v23.05
+scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux openmp=1 cppthreads=0 arch=armv8.2-a multi_isa=1 build=native
+
+popd
diff --git a/ci/docker/install/requirements b/ci/docker/install/requirements
index 482846cb2f..7c343fccdc 100644
--- a/ci/docker/install/requirements
+++ b/ci/docker/install/requirements
@@ -35,3 +35,4 @@ scipy<1.7.0 # Restrict scipy version due to https://github.com/apache/mxnet/issu
setuptools
coverage
packaging
+scons; platform_machine == 'aarch64'
diff --git a/config/distribution/linux_aarch64_cpu.cmake b/config/distribution/linux_aarch64_cpu.cmake
index 26e7b2cbb2..9e9d13dadd 100644
--- a/config/distribution/linux_aarch64_cpu.cmake
+++ b/config/distribution/linux_aarch64_cpu.cmake
@@ -19,7 +19,7 @@ set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type")
set(CFLAGS "-march=armv8-a+crc+crypto -moutline-atomics" CACHE STRING "CFLAGS")
set(CXXFLAGS "-march=armv8-a" CACHE STRING "CXXFLAGS")
-set(USE_BLAS ArmPL CACHE STRING "BLAS")
+set(USE_BLAS Open CACHE STRING "BLAS")
set(USE_CUDA OFF CACHE BOOL "Build with CUDA support")
set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support")
set(USE_OPENMP ON CACHE BOOL "Build with Openmp support")
@@ -36,10 +36,10 @@ set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support")
# from <acl_root>/lib/<binaries_folder_for_your_arch> to <acl_root>/build
# The resulting acl root folder should look something like:
# LICENSE README.md arm_compute build examples include lib scripts support utils
-set(ENV{ACL_ROOT_DIR} "")
-set(MKLDNN_USE_ACL OFF CACHE BOOL "Integrate MKLDNN with Arm Compute Library")
+set(ENV{ACL_ROOT_DIR} "/work/deps/acl/ComputeLibrary")
+set(MKLDNN_USE_ACL ON CACHE BOOL "Integrate MKLDNN with Arm Compute Library")
# APL can be downloaded from https://developer.arm.com/tools-and-software/server-and-hpc/downloads/arm-performance-libraries
# Note that APL needs to be added to LD_LIBRARY_PATH
-set(MKLDNN_USE_APL ON CACHE BOOL "Integrate MKLDNN with Arm Performance Libraries")
+set(MKLDNN_USE_APL OFF CACHE BOOL "Integrate MKLDNN with Arm Performance Libraries")
# Due to a MKLDNN bug we will need to manually set the ArmPL header
-set(BLAS_INCLUDE_DIR "/opt/arm/armpl_21.0_gcc-8.2/include_lp64_mp" CACHE STRING "Specifies BLAS include dir")
+# set(BLAS_INCLUDE_DIR "/opt/arm/armpl_21.0_gcc-8.2/include_lp64_mp" CACHE STRING "Specifies BLAS include dir")