Skip to content

Commit

Permalink
[build] Turn TI_LLVM_15 on by default (taichi-dev#6649)
Browse files Browse the repository at this point in the history
For taichi devs, if you hit any issues with this option, please turn it
off temporarily and open an issue.

Issue: taichi-dev#6447

### Brief Summary

There're a few followup cleanups after PR but let's turn it on by
default to shake out all the problems.
  • Loading branch information
ailzhang authored Nov 18, 2022
1 parent 0441864 commit df89841
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 53 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,10 @@ jobs:
. .github/workflows/scripts/common-utils.sh
prepare-build-cache
- name: Download Pre-Built LLVM 10.0.0
run: python misc/ci_download.py
env:
CI_PLATFORM: macos

- name: Create Python Wheel
run: |
# Use the molten-vk v1.1.10 downloaded from taichi assets
brew uninstall molten-vk -f
export PATH=$(pwd)/taichi-llvm/bin/:$PATH
.github/workflows/scripts/unix-build.sh
env:
PROJECT_NAME: ${{ matrix.name }}
Expand Down Expand Up @@ -293,7 +287,7 @@ jobs:
shell: pwsh
if: ${{ needs.check_files.outputs.run_job != 'false' }}
run: |
.\.github\workflows\scripts\win_build.ps1 -llvmVer 10 -installVulkan -libsDir "$env:LocalAppData/buildbot"
.\.github\workflows\scripts\win_build.ps1 -llvmVer 15 -installVulkan -libsDir "$env:LocalAppData/buildbot"
env:
PY: ${{ matrix.python }}
PROJECT_NAME: ${{ matrix.name }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/scripts/check_clang_tidy.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/bin/bash

CI_SETUP_CMAKE_ARGS=$1
# TODO: move inside docker
wget https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-linux.zip
unzip taichi-llvm-15-linux.zip && rm taichi-llvm-15-linux.zip
export LLVM_DIR="$PWD/taichi-llvm-15"

cd taichi
pushd taichi
python3 -m pip install -r requirements_dev.txt

CI_SETUP_CMAKE_ARGS=$1
export CI_SETUP_CMAKE_ARGS
python3 ./scripts/run_clang_tidy.py $PWD/taichi -clang-tidy-binary clang-tidy-10 -header-filter=$PWD/taichi -j2
popd
43 changes: 27 additions & 16 deletions .github/workflows/scripts/unix-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,35 @@ set -ex

[[ "$IN_DOCKER" == "true" ]] && cd taichi

# TODO: Move llvm installation from container image to here
if [[ "$LLVM_VERSION" == "15" ]]; then
if [[ $OSTYPE == "linux-"* ]]; then
wget https://github.com/ailzhang/torchhub_example/releases/download/0.2/taichi-llvm-15-linux.zip
if [[ $OSTYPE == "linux-"* ]]; then
if [ ! -d ~/taichi-llvm-15 ]; then
pushd ~
wget https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-linux.zip
unzip taichi-llvm-15-linux.zip && rm taichi-llvm-15-linux.zip
export PATH="$PWD/taichi-llvm-15/bin:$PATH"
elif [ "$(uname -s):$(uname -m)" == "Darwin:arm64" ]; then
# The following commands are done manually to save time.
#wget https://github.com/ailzhang/torchhub_example/releases/download/0.2/taichi-llvm-15-m1.zip
#unzip taichi-llvm-15-m1.zip && rm taichi-llvm-15-m1.zip
export PATH="/Users/github/taichi-llvm-15-m1/bin:$PATH"
elif [ "$(uname -s):$(uname -m)" == "Darwin:x86_64" ]; then
# The following commands are done manually to save time.
#wget https://github.com/ailzhang/torchhub_example/releases/download/0.2/llvm-15-macos10.15.zip
#unzip llvm-15-macos10.15.zip && rm llvm-15-macos10.15.zip
export LLVM_DIR="~/llvm-15-mac10.15/"
popd
fi
export TAICHI_CMAKE_ARGS="$TAICHI_CMAKE_ARGS -DTI_LLVM_15:BOOL=ON"

export LLVM_DIR="$HOME/taichi-llvm-15"
elif [ "$(uname -s):$(uname -m)" == "Darwin:arm64" ]; then
# The following commands are done manually to save time.
if [ ! -d ~/taichi-llvm-15-m1 ]; then
pushd ~
wget https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-m1.zip
unzip taichi-llvm-15-m1.zip && rm taichi-llvm-15-m1.zip
popd
fi

export LLVM_DIR="$HOME/taichi-llvm-15-m1"
elif [ "$(uname -s):$(uname -m)" == "Darwin:x86_64" ]; then
# The following commands are done manually to save time.
if [ ! -d ~/llvm-15-mac10.15 ]; then
pushd ~
wget https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/llvm-15-mac10.15.zip
unzip llvm-15-mac10.15.zip && rm llvm-15-mac10.15.zip
popd
fi

export LLVM_DIR="$HOME/llvm-15-mac10.15/"
fi

build_taichi_wheel() {
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ jobs:
-DTI_WITH_VULKAN:BOOL=ON
-DTI_WITH_C_API=ON
-DTI_BUILD_TESTS:BOOL=${{ matrix.with_cpp_tests }}
LLVM_VERSION: 15
# [DEBUG] Copy this step around to enable debugging inside Github Action instances.
#- name: Setup tmate session
Expand Down Expand Up @@ -214,7 +213,6 @@ jobs:
-DTI_WITH_VULKAN:BOOL=ON
-DTI_BUILD_TESTS:BOOL=ON
-DTI_WITH_C_API=ON
LLVM_VERSION: 15
- name: Test
id: test
Expand Down Expand Up @@ -356,7 +354,6 @@ jobs:
-DTI_WITH_VULKAN:BOOL=ON
-DTI_BUILD_TESTS:BOOL=ON
-DTI_WITH_C_API=ON
LLVM_VERSION: 15
- name: Test
id: test
Expand Down
2 changes: 1 addition & 1 deletion cmake/TaichiCore.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
option(USE_STDCPP "Use -stdlib=libc++" OFF)
option(TI_WITH_LLVM "Build with LLVM backends" ON)
option(TI_LLVM_15 "Switch to LLVM 15" OFF)
option(TI_LLVM_15 "Switch to LLVM 15" ON)
option(TI_WITH_METAL "Build with the Metal backend" ON)
option(TI_WITH_CUDA "Build with the CUDA backend" ON)
option(TI_WITH_CUDA_TOOLKIT "Build with the CUDA toolkit" OFF)
Expand Down
24 changes: 0 additions & 24 deletions misc/ci_download.py

This file was deleted.

0 comments on commit df89841

Please sign in to comment.