Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build llvm with clang since gcc on ppc64le doesn't support __builtin_thread_pointer #2379

Merged
merged 4 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docker/Dockerfile.llvm-project
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ RUN distro=$(cat /etc/os-release|grep -Po '(?<=^ID=").*(?=")|(?<=^ID=)[^"].*[^"]
ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata && \
apt-get install -qq -y --no-install-recommends \
autoconf automake ca-certificates cmake cppcheck curl \
default-jdk-headless gcc g++ git libncurses-dev \
autoconf automake ca-certificates clang cmake cppcheck \
curl default-jdk-headless gcc g++ git libncurses-dev \
libtool make maven ninja-build openjdk-11-jdk-headless \
python3 python3-dev python3-distutils python3-numpy \
python3-pip python3-pytest-xdist python3-setuptools \
Expand All @@ -44,7 +44,7 @@ RUN distro=$(cat /etc/os-release|grep -Po '(?<=^ID=").*(?=")|(?<=^ID=)[^"].*[^"]
https://dl.fedoraproject.org/pub/epel/epel-release-latest-${RHEL_VERSION}.noarch.rpm && \
yum update -q -y && \
yum install -q -y \
autoconf automake ca-certificates cmake diffutils \
autoconf automake ca-certificates clang cmake diffutils \
file java-11-openjdk-devel java-11-openjdk-headless \
gcc gcc-c++ git libtool make ncurses-devel \
python39 python39-devel python39-numpy python39-pip \
Expand Down Expand Up @@ -84,7 +84,9 @@ RUN git clone -n https://github.com/llvm/llvm-project.git \
&& cd llvm-project \
&& git checkout ${LLVM_PROJECT_SHA1} \
&& mkdir -p build && cd build \
&& cmake -G Ninja ../llvm \
# Build with clang since gcc on ppc64le doesn't support __builtin_thread_pointer
&& CC=clang CXX=clang++ \
cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_TARGETS_TO_BUILD="host" \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
7 changes: 4 additions & 3 deletions docker/Dockerfile.onnx-mlir
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ RUN LLVM_PROJECT_ROOT=${WORK_DIR}/llvm-project \
&& rm -rf build && mkdir -p build && cd build \
# NNPA acclerator is built on all archs to enable lit tests
# (dependent libzdnn is built on s390x only)
&& cmake -DMLIR_DIR=${LLVM_PROJECT_ROOT}/build/lib/cmake/mlir \
&& CC=clang CXX=clang++ \
cmake -DMLIR_DIR=${LLVM_PROJECT_ROOT}/build/lib/cmake/mlir \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_MESSAGE=NEVER \
-DONNX_MLIR_ACCELERATORS=${ACCEL} .. \
Expand Down Expand Up @@ -79,8 +80,8 @@ RUN LLVM_PROJECT_ROOT=${WORK_DIR}/llvm-project \
pip3 uninstall -q -y Cython pybind11 pytest pytest-forked \
pytest-xdist typing-extensions && \
yum remove -q -y \
adwaita-icon-theme autoconf automake cmake diffutils file \
git libtool make python39 && \
adwaita-icon-theme autoconf automake cmake file \
git libtool python39 && \
rm -rf /var/cache/dnf/* /usr/local/bin/ninja; \
fi \
&& rm -rf /tmp/* /usr/bin/python \
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile.onnx-mlir-dev
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ RUN LLVM_PROJECT_ROOT=${WORK_DIR}/llvm-project \
&& rm -rf build && mkdir -p build && cd build \
# NNPA acclerator is built on all archs to enable lit tests
# (dependent libzdnn is built on s390x only)
&& cmake -DMLIR_DIR=${LLVM_PROJECT_ROOT}/build/lib/cmake/mlir \
&& CC=clang CXX=clang++ \
cmake -DMLIR_DIR=${LLVM_PROJECT_ROOT}/build/lib/cmake/mlir \
-DCMAKE_BUILD_TYPE=Debug \
-DONNX_MLIR_TEST_OPTLEVEL=0 \
-DONNX_MLIR_ACCELERATORS=${ACCEL} .. \
Expand Down
Loading