From 8ab141698bba5d674f99da789696f6346cbd07bb Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Aug 2022 11:30:21 -0700 Subject: [PATCH] Fixups for merging --- .github/workflows/wheel_manylinux_pypi.yaml | 30 ++++++++-------- .github/workflows/wheel_winmac_nightly.yaml | 40 +++++++-------------- wheel/build_lib_win.bat | 2 +- wheel/build_wheel_manylinux.sh | 13 +++---- 4 files changed, 34 insertions(+), 51 deletions(-) diff --git a/.github/workflows/wheel_manylinux_pypi.yaml b/.github/workflows/wheel_manylinux_pypi.yaml index f148ebb..9bfd33b 100644 --- a/.github/workflows/wheel_manylinux_pypi.yaml +++ b/.github/workflows/wheel_manylinux_pypi.yaml @@ -5,7 +5,6 @@ on: push: branches: - main - - release/* workflow_dispatch: pull_request: branches: @@ -19,6 +18,8 @@ jobs: fail-fast: false matrix: # matrix of build configs + pkg: + - pypi-nightly config: - cuda: 'none' image: 'tlcpack/package-cpu:v0.5' @@ -40,15 +41,13 @@ jobs: set -eux git clone https://github.com/apache/tvm tvm --recursive - name: Sync Package - env: - TAG: pypi run: | set -eux python3 common/sync_package.py \ --cuda ${{ matrix.config.cuda }} \ --package-name ${{ matrix.config.package_name }} \ --use-public-version \ - "$TAG" + ${{ matrix.pkg }} - name: Build env: IMAGE: ${{ matrix.config.image }} @@ -61,7 +60,6 @@ jobs: env: IMAGE: ${{ matrix.config.image }} WHEEL_TEST: "True" - # continue-on-error: true run: | set -eux docker/bash.sh --no-gpu $IMAGE ./wheel/run_tests.sh @@ -69,14 +67,14 @@ jobs: with: name: wheel-${{ matrix.config.package_name }}-${{ matrix.config-cuda }} path: tvm/python/repaired_wheels - # - name: Wheel-Deploy-Pypi - # # if: github.ref == 'refs/heads/main' - # env: - # TWINE_NON_INTERACTIVE: 1 - # TWINE_REPOSITORY: pypi - # TWINE_USERNAME: __token__ - # TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} - # run: | - # set -eux - # python3 -m pip install twine - # twine upload tvm/python/repaired_wheels/* + - name: Wheel-Deploy-Pypi + if: github.ref == 'refs/heads/main' + env: + TWINE_NON_INTERACTIVE: 1 + TWINE_REPOSITORY: pypi + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} + run: | + set -eux + python3 -m pip install twine + twine upload tvm/python/repaired_wheels/* diff --git a/.github/workflows/wheel_winmac_nightly.yaml b/.github/workflows/wheel_winmac_nightly.yaml index 23003fa..f6feb09 100644 --- a/.github/workflows/wheel_winmac_nightly.yaml +++ b/.github/workflows/wheel_winmac_nightly.yaml @@ -5,8 +5,6 @@ on: push: branches: - main - - release/* - - release-build-macos pull_request: branches: - main @@ -20,7 +18,8 @@ jobs: matrix: os: - macOS-latest -# pkg: ['tlcpack', 'tlcpack-nightly'] + pkg: + - apache-tvm runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -46,14 +45,12 @@ jobs: run: | git clone https://github.com/apache/tvm tvm --recursive - name: Sync Package - env: - TAG: apache-tvm run: | set -eux python3 common/sync_package.py \ --package-name apache-tvm \ --use-public-version \ - "$TAG" + ${{ matrix.pkg }} - name: Build@MacOS if: startsWith(matrix.os, 'macOS') shell: bash -l {0} @@ -110,20 +107,6 @@ jobs: python -m pip install setuptools Cython wheel cd tvm/python python setup.py bdist_wheel - # Use system python instead of conda for upload - - name: Wheel-Deploy-Pypi - # if: github.ref == 'refs/heads/main' - env: - TWINE_NON_INTERACTIVE: 1 - # TWINE_REPOSITORY: pypi - # TWINE_USERNAME: __token__ - # TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} - run: | - set -eux - python3 -m pip install twine - find . - # find tvm/python | grep wheels - # twine upload tvm/python/repaired_wheels/* - uses: actions/upload-artifact@v3 with: name: release-wheels @@ -132,11 +115,12 @@ jobs: with: name: release-build path: tvm/python/build/ -# - name: Wheel-Deploy -# # if: github.ref == 'refs/heads/main' -# env: -# GITHUB_TOKEN: ${{ secrets.TLCPACK_GITHUB_TOKEN }} -# run: | -# set -eux -# python3 -m pip install github3.py -# python3 wheel/wheel_upload.py --tag v0.7.dev1 tvm/python/dist + # Use system python instead of conda for upload + - name: Wheel-Deploy + if: github.ref == 'refs/heads/main' + env: + GITHUB_TOKEN: ${{ secrets.TLCPACK_GITHUB_TOKEN }} + run: | + set -eux + python3 -m pip install github3.py + python3 wheel/wheel_upload.py --tag v0.7.dev1 tvm/python/dist diff --git a/wheel/build_lib_win.bat b/wheel/build_lib_win.bat index 0e48536..a1245e0 100644 --- a/wheel/build_lib_win.bat +++ b/wheel/build_lib_win.bat @@ -11,7 +11,7 @@ cmake -A x64 -Thost=x64 ^ -DUSE_RPC=ON ^ -DUSE_SORT=ON ^ -DUSE_RANDOM=ON ^ - -DSUMMARIZE=ONE ^ + -DSUMMARIZE=ON ^ -DUSE_GRAPH_RUNTIME_DEBUG=ON ^ .. diff --git a/wheel/build_wheel_manylinux.sh b/wheel/build_wheel_manylinux.sh index a19e446..2abce07 100755 --- a/wheel/build_wheel_manylinux.sh +++ b/wheel/build_wheel_manylinux.sh @@ -1,11 +1,12 @@ #!/usr/bin/env bash +set -eux source /multibuild/manylinux_utils.sh function usage() { echo "Usage: $0 [--cuda CUDA]" echo - echo -e "--cuda {none 10.2 11.0 11.1 11.3}" + echo -e "--cuda {none 10.2 11.0 11.1 11.3, 11.6}" echo -e "\tSpecify the CUDA version in the TVM (default: none)." } @@ -45,7 +46,7 @@ function audit_tlcpack_wheel() { TVM_PYTHON_DIR="/workspace/tvm/python" PYTHON_VERSIONS_CPU=("3.7" "3.8" "3.9" "3.10") PYTHON_VERSIONS_GPU=("3.7" "3.8") -CUDA_OPTIONS=("none" "10.2" "11.0" "11.1" "11.3") +CUDA_OPTIONS=("none" "10.2" "11.0" "11.1" "11.3" "11.6") CUDA="none" while [[ $# -gt 0 ]]; do @@ -58,13 +59,13 @@ while [[ $# -gt 0 ]]; do ;; -h|--help) usage - exit -1 + exit 1 ;; *) # unknown option echo "Unknown argument: $arg" echo usage - exit -1 + exit 1 ;; esac done @@ -72,8 +73,8 @@ done if ! in_array "${CUDA}" "${CUDA_OPTIONS[*]}" ; then echo "Invalid CUDA option: ${CUDA}" echo - echo 'CUDA can only be {"none", "10.0", "10.1", "10.2"}' - exit -1 + echo 'CUDA can only be' "${CUDA_OPTIONS[@]}" + exit 1 fi if [[ ${CUDA} == "none" ]]; then