Multi build - add build for IBM Systems Z and P (#157)

* Update .travis.yml

* add Z and Power builds

* Build (#1)

* prereq build for Z and Power

* prereq build for Z and Power

* prereq build for Z and Power

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* Update MLIR version

* test build

* test build

* Update MLIR version

* test build

* test build

* test build

* test build

* test build

* test build

* test build

* test build

* test build

* test build

* test build

* test build

* test build

* test build
This commit is contained in:
Kevin O'Brien 2020-05-29 17:22:13 -04:00 committed by GitHub
parent 20dd6544aa
commit 536a20695f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 178 additions and 5 deletions

View File

@ -3,20 +3,40 @@ services:
- docker - docker
language: cpp language: cpp
dist: bionic dist: bionic
arch:
- s390x
- ppc64le
- amd64
script: script:
- docker build --tag onnx-mlir-build:initial ./docker - echo "CPU Architecture is " $TRAVIS_CPU_ARCH
- echo "commit is " $TRAVIS_COMMIT
- df -h
- if [ "$TRAVIS_COMMIT_MESSAGE" == "Update MLIR version" ]; then
echo "Building Prereq";
docker build --tag onnxmlirczar/onnx-mlir-llvmimage:$TRAVIS_CPU_ARCH -f ./docker/prereq.$TRAVIS_CPU_ARCH.Dockerfile ./utils;
docker login -u onnxmlirczar -p 143f1da2-332f-45a1-8587-d6cb07c13230
docker push onnxmlirczar/onnx-mlir-llvmimage:$TRAVIS_CPU_ARCH
exit;
else
echo "Regular Build";
fi
- docker build --tag onnx-mlir-build:initial --build-arg BASE="onnxmlirczar/onnx-mlir-image:$TRAVIS_CPU_ARCH" -f ./docker/$TRAVIS_CPU_ARCH.Dockerfile ./docker
- docker run -itd --name build onnx-mlir-build:initial - docker run -itd --name build onnx-mlir-build:initial
- echo "docker is running now"
- df -h
- docker cp $(pwd) build:/build/onnx-mlir - docker cp $(pwd) build:/build/onnx-mlir
- cd docker - cd docker
- chmod a+x compile-onnx-mlir.sh - chmod a+x compile-onnx-mlir.sh
- docker cp compile-onnx-mlir.sh build:/usr/bin/compile-onnx-mlir.sh - docker cp compile-onnx-mlir.sh build:/usr/bin/compile-onnx-mlir.sh
- docker exec -it build compile-onnx-mlir.sh - echo "about to execute build inside docker"
- docker exec build df -h
- docker exec build compile-onnx-mlir.sh
- docker commit build onnxmlirczar/onnx-mlir-build:latest - docker commit build onnxmlirczar/onnx-mlir-build:latest
after_success: after_success:
- if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == "master" ]; then - if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == "master" ]; then
echo "Pushing new build to docker hub"; echo "Pushing new build to docker hub";
docker login -u onnxmlirczar -p 143f1da2-332f-45a1-8587-d6cb07c13230; docker login -u onnxmlirczar -p 143f1da2-332f-45a1-8587-d6cb07c13230;
docker push onnxmlirczar/onnx-mlir-build:latest; docker push onnxmlirczar/onnx-mlir-build:$TRAVIS_CPU_ARCH;
else else
echo "Skip pushing build"; echo "Skip pushing build";
fi fi

View File

@ -1,4 +1,4 @@
# Grab pre-built LLVM from github packages # Grab pre-built LLVM from docker hub
FROM onnxmlirczar/onnx-mlir-llvmimage:initial FROM onnxmlirczar/onnx-mlir-llvmimage:initial
WORKDIR /build/bin WORKDIR /build/bin

12
docker/ppc64le.Dockerfile Normal file
View File

@ -0,0 +1,12 @@
# Grab pre-built LLVM from docker hub
FROM onnxmlirczar/onnx-mlir-llvmimage:ppc64le
WORKDIR /build/bin
WORKDIR /build
ENV HOME=/build
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN pyenv global 3.7.0
RUN pyenv rehash
ENV PATH=$PATH:/build/bin

View File

@ -0,0 +1,43 @@
FROM ubuntu:focal
WORKDIR /build
# install stuff that is needed for compiling LLVM, MLIR and ONNX
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git cmake ninja-build libprotobuf-dev protobuf-compiler
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get -y install \
make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils \
libffi-dev liblzma-dev
RUN git clone git://github.com/yyuu/pyenv.git .pyenv
RUN git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
ENV HOME=/build
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN pyenv install 3.7.0
RUN pyenv global 3.7.0
RUN pyenv rehash
# first install MLIR in llvm-project
RUN mkdir bin
ENV PATH=$PATH:/build/bin
COPY clone-mlir.sh bin/clone-mlir.sh
RUN chmod a+x bin/clone-mlir.sh
RUN clone-mlir.sh
WORKDIR /build/llvm-project/build
RUN cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="host" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_RTTI=ON
RUN cmake --build . --target -- ${MAKEFLAGS}
RUN cmake --build . --target check-mlir

View File

@ -0,0 +1,43 @@
FROM ubuntu:focal
WORKDIR /build
# install stuff that is needed for compiling LLVM, MLIR and ONNX
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git cmake ninja-build libprotobuf-dev protobuf-compiler
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get -y install \
make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils \
libffi-dev liblzma-dev
RUN git clone git://github.com/yyuu/pyenv.git .pyenv
RUN git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
ENV HOME=/build
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN pyenv install 3.7.0
RUN pyenv global 3.7.0
RUN pyenv rehash
# first install MLIR in llvm-project
RUN mkdir bin
ENV PATH=$PATH:/build/bin
COPY clone-mlir.sh bin/clone-mlir.sh
RUN chmod a+x bin/clone-mlir.sh
RUN clone-mlir.sh
WORKDIR /build/llvm-project/build
RUN cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="host" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_RTTI=ON
RUN cmake --build . --target -- ${MAKEFLAGS}
RUN cmake --build . --target check-mlir

View File

@ -0,0 +1,43 @@
FROM ubuntu:focal
WORKDIR /build
# install stuff that is needed for compiling LLVM, MLIR and ONNX
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git cmake ninja-build libprotobuf-dev protobuf-compiler
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get -y install \
make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils \
libffi-dev liblzma-dev
RUN git clone git://github.com/yyuu/pyenv.git .pyenv
RUN git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
ENV HOME=/build
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN pyenv install 3.7.0
RUN pyenv global 3.7.0
RUN pyenv rehash
# first install MLIR in llvm-project
RUN mkdir bin
ENV PATH=$PATH:/build/bin
COPY clone-mlir.sh bin/clone-mlir.sh
RUN chmod a+x bin/clone-mlir.sh
RUN clone-mlir.sh
WORKDIR /build/llvm-project/build
RUN cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="host" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_RTTI=ON
#RUN cmake --build . --target -- ${MAKEFLAGS}
#RUN cmake --build . --target check-mlir

12
docker/s390x.Dockerfile Normal file
View File

@ -0,0 +1,12 @@
# Grab pre-built LLVM from docker hub
FROM onnxmlirczar/onnx-mlir-llvmimage:s390x
WORKDIR /build/bin
WORKDIR /build
ENV HOME=/build
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN pyenv global 3.7.0
RUN pyenv rehash
ENV PATH=$PATH:/build/bin