Skip to content

Commit

Permalink
do not install TVM if Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
mshr-h committed Feb 9, 2024
1 parent e65c769 commit 0d4ca53
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
python -m pip install pandas
- uses: actions/cache@v3
# TVM takes forever, we try to cache it.
if: ${{ startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')}}
if: ${{ startsWith(matrix.os, 'macos')}}
id: cache
env:
CACHE_NUMBER: 13
Expand All @@ -90,32 +90,19 @@ jobs:
# Getting TVM requires: 1) Install LLVM 2) fetching TVM from github, 3) cmake, 4) make, 5) install python dependency.
# 2 to 4 will be retrieved from the cache.
# The pipeline only works for Unix systems. For windows we will have to compile LLVM from source which is a no go.
- name: Install LLVM if Ubuntu
if: ${{ startsWith(matrix.os, 'ubuntu')}}
run: |
sudo apt install llvm-${{ env.LLVM_VERSION }}-dev
- name: Install LLVM if Mac
if: ${{ startsWith(matrix.os, 'macos')}}
run: |
brew install llvm@${{ env.LLVM_VERSION }}
- name: Fetch and prepare TVM for compilation if Ubuntu or Mac
if: ${{ steps.cache.outputs.cache-hit != 'true' && (startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')) }}
- name: Fetch and prepare TVM for compilation if Mac
if: ${{ steps.cache.outputs.cache-hit != 'true' && startsWith(matrix.os, 'macos') }}
run: |
cd ~/work/hummingbird
git clone https://github.com/apache/tvm.git
cd tvm
git checkout tags/${{env.TVM_VERSION_TAG}}
git submodule update --recursive --init
cmake -E make_directory build
- name: CMake TVM if Ubuntu
if: ${{ steps.cache.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') }}
run: |
cd ~/work/hummingbird/tvm
cmake -S . -B build \
-DUSE_RPC=ON \
-DUSE_GRAPH_RUNTIME=ON \
-DUSE_LLVM="llvm-config-${{ env.LLVM_VERSION }} --link-static" \
-DHIDE_PRIVATE_SYMBOLS=ON
- name: CMake TVM if Mac
if: ${{ steps.cache.outputs.cache-hit != 'true' && startsWith(matrix.os, 'macos') }}
run: |
Expand All @@ -125,13 +112,13 @@ jobs:
-DUSE_GRAPH_RUNTIME=ON \
-DUSE_LLVM="$(brew --prefix llvm@${{ env.LLVM_VERSION }})/bin/llvm-config --link-static" \
-DHIDE_PRIVATE_SYMBOLS=ON
- name: Build TVM if Ubuntu or Mac
if: ${{ steps.cache.outputs.cache-hit != 'true' && (startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')) }}
- name: Build TVM if Mac
if: ${{ steps.cache.outputs.cache-hit != 'true' && startsWith(matrix.os, 'macos') }}
run: |
cd ~/work/hummingbird/tvm
cmake --build build
- name: Install python TVM if Ubuntu or Mac
if: ${{ (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
- name: Install python TVM if Mac
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
cd ~/work/hummingbird/tvm/python
python3 -m pip install -e .
Expand Down

0 comments on commit 0d4ca53

Please sign in to comment.