From 0d4ca531f3b8357dca6ca674837808e6f2d2338b Mon Sep 17 00:00:00 2001 From: Masahiro Hiramori Date: Fri, 9 Feb 2024 18:08:16 +0900 Subject: [PATCH] do not install TVM if Ubuntu --- .github/workflows/pythonapp.yml | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 892dc35a..ed508e8b 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -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 @@ -90,16 +90,12 @@ 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 @@ -107,15 +103,6 @@ jobs: 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: | @@ -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 .