Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
add acl support
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jun 22, 2023
1 parent 76d73db commit 4adef65
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 13 deletions.
17 changes: 9 additions & 8 deletions ci/docker/Dockerfile.build.centos7_aarch64_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand 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
Expand Down
34 changes: 34 additions & 0 deletions ci/docker/install/centos7_acl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/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.

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
1 change: 1 addition & 0 deletions ci/docker/install/requirements
Original file line number Diff line number Diff line change
Expand Up @@ -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'
10 changes: 5 additions & 5 deletions config/distribution/linux_aarch64_cpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")

0 comments on commit 4adef65

Please sign in to comment.