| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| # GH actions. |
| # We use it to cover windows and mac builds |
| # Jenkins is still the primary CI |
| |
| name: CI |
| |
| on: |
| push: |
| branches: |
| - main |
| pull_request: |
| branches: |
| - main |
| workflow_dispatch: |
| |
| concurrency: |
| group: CI-${{ github.event.pull_request.number || github.sha }} |
| cancel-in-progress: true |
| |
| jobs: |
| MacOS: |
| if: ${{ github.repository == 'apache/tvm' }} |
| runs-on: macOS-latest |
| steps: |
| - uses: actions/checkout@v2 |
| with: |
| submodules: 'recursive' |
| - name: Set up environment |
| uses: ./.github/actions/setup |
| - name: Install LLVM dependencies |
| shell: bash -l {0} |
| run: | |
| conda install -c conda-forge llvmdev cmake ninja zlib |
| - name: Build TVM wheel |
| shell: bash -l {0} |
| run: | |
| pip install scikit-build-core |
| export CMAKE_ARGS="-DUSE_LLVM=ON -DBUILD_TESTING=OFF" |
| pip wheel --no-deps -w dist . -v |
| - name: Install TVM from wheel |
| shell: bash -l {0} |
| run: | |
| pip install dist/*.whl |
| |
| - name: Test |
| shell: bash -l {0} |
| run: >- |
| python -m pytest -v tests/python/all-platform-minimal-test |
| - name: Minimal Metal Compile-Only |
| shell: bash -l {0} |
| run: | |
| python -m pytest -v -s 'tests/python/codegen/test_gpu_codegen_allreduce.py::test_allreduce_sum_compile' |
| python -m pytest -v -s 'tests/python/codegen/test_target_codegen_metal.py::test_func_with_trailing_pod_params' |
| - name: Minimal Metal Compile-and-Run |
| shell: bash -l {0} |
| run: >- |
| python -m pytest -v -s 'tests/python/codegen/test_target_codegen_metal.py' |
| python -m pytest -v -s 'tests/python/codegen/test_target_codegen_gpu_common.py' |
| python -m pytest -v -s 'tests/python/codegen/test_gpu_codegen_allreduce.py::test_allreduce_sum[dims0-metal]' |
| |
| Windows: |
| if: ${{ github.repository == 'apache/tvm' }} |
| runs-on: windows-latest |
| steps: |
| - uses: actions/checkout@v2 |
| with: |
| submodules: 'recursive' |
| - name: Set up environment |
| uses: ./.github/actions/setup |
| - name: Install LLVM dependencies |
| shell: cmd /C call {0} |
| run: | |
| conda install -c conda-forge llvmdev cmake ninja zlib libxml2-devel |
| - name: Install TVM |
| shell: cmd /C call {0} |
| run: | |
| pip install scikit-build-core |
| set CMAKE_ARGS=-DUSE_LLVM=ON -DBUILD_TESTING=OFF |
| pip install --no-deps . -v |
| - name: Install test dependencies |
| shell: cmd /C call {0} |
| run: | |
| pip install psutil cloudpickle ml_dtypes numpy packaging scipy tornado typing_extensions |
| - name: Test |
| shell: cmd /C call {0} |
| run: >- |
| python -m pytest -v tests/python/all-platform-minimal-test |