diff --git a/.github/workflows/wheel_manylinux_pypi.yaml b/.github/workflows/wheel_manylinux_pypi.yaml index bf9fe6e..0f94fe8 100644 --- a/.github/workflows/wheel_manylinux_pypi.yaml +++ b/.github/workflows/wheel_manylinux_pypi.yaml @@ -5,6 +5,7 @@ on: push: branches: - main + - release/* workflow_dispatch: pull_request: branches: @@ -16,32 +17,34 @@ jobs: Build: strategy: matrix: - pkg: ['pypi-nightly'] # matrix of build configs config: - cuda: 'none' image: 'tlcpack/package-cpu:v0.5' package_name: 'apache-tvm' - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - name: TVM checkout run: | + 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 \ - ${{ matrix.pkg }} + "$TAG" - name: Build env: IMAGE: ${{ matrix.config.image }} CUDA: ${{ matrix.config.cuda }} run: | + set -eux docker/bash.sh --no-gpu $IMAGE ./wheel/build_wheel_manylinux.sh --cuda $CUDA - name: Test if: matrix.config.cuda == 'none' @@ -50,14 +53,16 @@ jobs: WHEEL_TEST: "True" continue-on-error: true run: | + set -eux docker/bash.sh --no-gpu $IMAGE ./wheel/run_tests.sh - name: Wheel-Deploy-Pypi - if: github.ref == 'refs/heads/main' + # 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 a47ce7f..66d6644 100644 --- a/.github/workflows/wheel_winmac_nightly.yaml +++ b/.github/workflows/wheel_winmac_nightly.yaml @@ -5,9 +5,12 @@ on: push: branches: - main + - release/* + - release-build-macos pull_request: branches: - main + workflow_dispatch: schedule: - cron: '0 6 * * *' # 6 AM UTC @@ -15,11 +18,10 @@ jobs: Build: strategy: matrix: - os: [macOS-latest, windows-2019] - pkg: ['tlcpack', 'tlcpack-nightly'] + os: [macOS-latest] +# pkg: ['tlcpack', 'tlcpack-nightly'] runs-on: ${{ matrix.os }} - steps: - uses: actions/checkout@v2 - uses: actions/cache@v1 @@ -44,17 +46,23 @@ jobs: run: | git clone https://github.com/apache/tvm tvm --recursive - name: Sync Package - run: python3 common/sync_package.py ${{ matrix.pkg }} + env: + TAG: pypi + run: | + set -eux + python3 common/sync_package.py "$TAG" - name: Build@MacOS if: startsWith(matrix.os, 'macOS') shell: bash -l {0} run: >- wheel/build_lib_osx.sh + - name: Build@Win if: startsWith(matrix.os, 'windows') shell: cmd /C call {0} run: >- wheel/build_lib_win.bat + # Build wheel for three python versions - uses: actions/setup-python@v2 with: @@ -66,6 +74,7 @@ jobs: python -m pip install setuptools Cython wheel cd tvm/python python setup.py bdist_wheel + - uses: actions/setup-python@v2 with: python-version: 3.8 @@ -76,11 +85,23 @@ jobs: python -m pip install setuptools Cython wheel cd tvm/python python setup.py bdist_wheel + + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Wheel-Build@Py39 + env: + MACOSX_DEPLOYMENT_TARGET: 10.15 + run: | + 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 - if: github.ref == 'refs/heads/main' +# 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/common/sync_package.py b/common/sync_package.py index a7e1b8a..4a53bf6 100644 --- a/common/sync_package.py +++ b/common/sync_package.py @@ -8,7 +8,7 @@ # Modify the following two settings during release # ----------------------------------------------------------- # Tag used for stable build. -__stable_build__ = "v0.8" +__stable_build__ = "v0.9.0" # ----------------------------------------------------------- def py_str(cstr): diff --git a/docker/Dockerfile.package-cu110 b/docker/Dockerfile.package-cu110 index 43e346a..5b5e62c 100644 --- a/docker/Dockerfile.package-cu110 +++ b/docker/Dockerfile.package-cu110 @@ -40,6 +40,9 @@ RUN bash /install/centos_install_python_package.sh 3.8 COPY install/centos_install_auditwheel.sh /install/centos_install_auditwheel.sh RUN bash /install/centos_install_auditwheel.sh +# Set default CUDA +RUN rm /usr/local/cuda; ln -s /usr/local/cuda-11.0 /usr/local/cuda + # Environment variables ENV PATH=/usr/local/cuda/bin:${PATH} ENV CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${CPLUS_INCLUDE_PATH} diff --git a/docker/Dockerfile.package-cu111 b/docker/Dockerfile.package-cu111 index d680f6f..8a66f95 100644 --- a/docker/Dockerfile.package-cu111 +++ b/docker/Dockerfile.package-cu111 @@ -40,6 +40,9 @@ RUN bash /install/centos_install_python_package.sh 3.8 COPY install/centos_install_auditwheel.sh /install/centos_install_auditwheel.sh RUN bash /install/centos_install_auditwheel.sh +# Set default CUDA +RUN rm /usr/local/cuda; ln -s /usr/local/cuda-11.1 /usr/local/cuda + # Environment variables ENV PATH=/usr/local/cuda/bin:${PATH} ENV CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${CPLUS_INCLUDE_PATH} diff --git a/docker/Dockerfile.package-cu113 b/docker/Dockerfile.package-cu113 index 051fbdb..d148393 100644 --- a/docker/Dockerfile.package-cu113 +++ b/docker/Dockerfile.package-cu113 @@ -40,6 +40,9 @@ RUN bash /install/centos_install_python_package.sh 3.8 COPY install/centos_install_auditwheel.sh /install/centos_install_auditwheel.sh RUN bash /install/centos_install_auditwheel.sh +# Set default CUDA +RUN rm /usr/local/cuda; ln -s /usr/local/cuda-11.3 /usr/local/cuda + # Environment variables ENV PATH=/usr/local/cuda/bin:${PATH} ENV CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${CPLUS_INCLUDE_PATH} diff --git a/wheel/build_lib_osx.sh b/wheel/build_lib_osx.sh index d68b647..4314540 100755 --- a/wheel/build_lib_osx.sh +++ b/wheel/build_lib_osx.sh @@ -1,7 +1,6 @@ #!/bin/bash -set -e -set -u +set -eux cd tvm rm -f config.cmake @@ -23,6 +22,7 @@ cmake -DCMAKE_BUILD_TYPE=Release \ -DUSE_ETHOSU=ON \ -DUSE_CMSISNN=ON \ -DUSE_MICRO=ON \ + -DSUMMARIZE=ON \ -DUSE_MICRO_STANDALONE_RUNTIME=ON \ -DUSE_METAL=ON \ .. diff --git a/wheel/build_lib_win.bat b/wheel/build_lib_win.bat index c975981..0e48536 100644 --- a/wheel/build_lib_win.bat +++ b/wheel/build_lib_win.bat @@ -11,6 +11,7 @@ cmake -A x64 -Thost=x64 ^ -DUSE_RPC=ON ^ -DUSE_SORT=ON ^ -DUSE_RANDOM=ON ^ + -DSUMMARIZE=ONE ^ -DUSE_GRAPH_RUNTIME_DEBUG=ON ^ .. diff --git a/wheel/build_wheel_manylinux.sh b/wheel/build_wheel_manylinux.sh index 19b41e6..a19e446 100755 --- a/wheel/build_wheel_manylinux.sh +++ b/wheel/build_wheel_manylinux.sh @@ -100,6 +100,7 @@ echo set\(USE_ETHOSN /opt/arm/ethosn-driver\) >> config.cmake echo set\(USE_ARM_COMPUTE_LIB /opt/arm/acl\) >> config.cmake echo set\(USE_MICRO ON\) >> config.cmake echo set\(USE_MICRO_STANDALONE_RUNTIME ON\) >> config.cmake +echo set\(SUMMARIZE ON\) >> config.cmake echo set\(USE_ETHOSU ON\) >> config.cmake echo set\(USE_CMSISNN ON\) >> config.cmake if [[ ${CUDA} != "none" ]]; then diff --git a/wheel/wheel_prune_and_sync.py b/wheel/wheel_prune_and_sync.py index 61e340d..6d493a1 100644 --- a/wheel/wheel_prune_and_sync.py +++ b/wheel/wheel_prune_and_sync.py @@ -109,12 +109,13 @@ def list_wheels(repo): def update_wheel_page(keep_list, site_repo, dry_run=False): """Update the wheel page""" - new_html = "" + new_html = '\n\n\n' for asset in keep_list: new_html += '%s
\n' % ( asset.browser_download_url, asset.name, ) + new_html += '\n' def run_cmd(cmd): proc = subprocess.Popen(