This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add aarch64 build support * add publish dockerfile * add options to build mkldnn w/ apl and acl add options to build mkldnn w/ arm performance libraries and arm compute library * remove libquadmath due to licensing issues #19053 Co-authored-by: Zhaoqi Zhu <[email protected]>
- Loading branch information
Showing
8 changed files
with
202 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- 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 | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/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 \ | ||
pandoc \ | ||
python3 \ | ||
python3-pip \ | ||
automake \ | ||
pkg-config \ | ||
openjdk-8-jdk \ | ||
patchelf | ||
|
||
# gcc-10 required for -moutline-atomics flag | ||
apt-add-repository "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main" | ||
apt-get update | ||
apt install -y gcc-10 g++-10 gfortran-10 | ||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-10 | ||
|
||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# 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(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type") | ||
set(CFLAGS "-march=armv8-a" CACHE STRING "CFLAGS") | ||
set(CXXFLAGS "-march=armv8-a" CACHE STRING "CXXFLAGS") | ||
|
||
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") | ||
set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found") | ||
set(USE_LAPACK ON CACHE BOOL "Build with lapack support") | ||
set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") | ||
set(USE_SSE OFF CACHE BOOL "Build with x86 SSE instruction support") | ||
set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") | ||
set(USE_DIST_KVSTORE OFF CACHE BOOL "Build with DIST_KVSTORE support") | ||
|
||
set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support") | ||
# Uncomment the following line to build MKLDNN with APL support | ||
# APL can be downloaded from https://developer.arm.com/tools-and-software/server-and-hpc/downloads/arm-performance-libraries | ||
# APL needs to be added to LD_LIBRARY_PATH | ||
## set(DNNL_BLAS_VENDOR “ARMPL” CACHE STRING “Build MKLDNN with Arm Performance Libraries as the BLAS library”) | ||
# Uncomment the following lines to build MKLDNN with ACL support | ||
# C++ 14 is requried to build with ACL and MKLDNN recommends building ACL from source rather than | ||
# using the pre-built binaries from https://github.com/ARM-software/ComputeLibrary/releases | ||
# If pre-built binaries are used anyways, make sure to copy and rename the appropriate binaries | ||
# folder from <acl_root>/lib/<binaries_folder> 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(CMAKE_CXX_STANDARD 14) | ||
## set(ENV{ACL_ROOT_DIR} ~/arm_compute-v21.02-bin-linux) | ||
## set(DNNL_AARCH64_USE_ACL ON CACHE BOOL “Build MKLDNN with Arm Compute Library integration”) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters