From ac1f03e6f7a6981f32bc786bc5438784b75c3c4c Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Mon, 6 Mar 2023 00:13:33 -0600 Subject: [PATCH] add jit,no-jit release matrix (#1916) --- .github/workflows/buildRelease.yml | 17 +++++++++++++++-- .../python_deploy/build_macos_packages.sh | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buildRelease.yml b/.github/workflows/buildRelease.yml index 1a05f8f0e..ad0b41ab7 100644 --- a/.github/workflows/buildRelease.yml +++ b/.github/workflows/buildRelease.yml @@ -14,6 +14,16 @@ jobs: build_linux: name: Manylinux Build runs-on: a100 + strategy: + matrix: + package: [ torch-mlir, torch-mlir-no-jit ] + py_version: [ cp38-cp38, cp310-cp310, cp311-cp311 ] + exclude: + - package: torch-mlir-no-jit + py_version: cp38-cp38 + - package: torch-mlir-no-jit + py_version: cp310-cp310 + steps: - name: Prepare workspace @@ -35,7 +45,7 @@ jobs: python -m pip install wheel TM_PACKAGE_VERSION=${{ github.event.inputs.python_package_version }} printf "TORCH_MLIR_PYTHON_PACKAGE_VERSION=%s\n" $TM_PACKAGE_VERSION > ./torch_mlir_package_version - ./build_tools/python_deploy/build_linux_packages.sh + TM_PYTHON_VERSIONS=${{ matrix.py_version }} TM_PACKAGES=${{ matrix.package }} ./build_tools/python_deploy/build_linux_packages.sh # If we were given a release_id, then upload the package we just built # to the github releases page. @@ -77,6 +87,9 @@ jobs: build_macos: name: MacOS Build runs-on: macos-latest + strategy: + matrix: + package: [ torch-mlir, torch-mlir-no-jit ] steps: - name: Get torch-mlir uses: actions/checkout@v3 @@ -92,7 +105,7 @@ jobs: TM_PACKAGE_VERSION=${{ github.event.inputs.python_package_version }} printf "TORCH_MLIR_PYTHON_PACKAGE_VERSION=%s\n" $TM_PACKAGE_VERSION > ./torch_mlir_package_version sudo ./build_tools/python_deploy/install_macos_deps.sh - TORCH_MLIR_PYTHON_VERSIONS="3.11" ./build_tools/python_deploy/build_macos_packages.sh + packages=${{ matrix.package }} TORCH_MLIR_PYTHON_VERSIONS="3.11" ./build_tools/python_deploy/build_macos_packages.sh # If we were given a release_id, then upload the package we just built # to the github releases page. diff --git a/build_tools/python_deploy/build_macos_packages.sh b/build_tools/python_deploy/build_macos_packages.sh index 1030142d5..f08fb70f8 100755 --- a/build_tools/python_deploy/build_macos_packages.sh +++ b/build_tools/python_deploy/build_macos_packages.sh @@ -22,7 +22,7 @@ this_dir="$(cd "$(dirname "$0")" && pwd)" repo_root="$(cd "$this_dir"/../../ && pwd)" python_versions="${TORCH_MLIR_PYTHON_VERSIONS:-3.9 3.10 3.11}" output_dir="${output_dir:-${this_dir}/wheelhouse}" -packages="${packages:-torch-mlir torch-mlir-no-jit-importer}" +packages="${packages:-torch-mlir}" PKG_VER_FILE="${repo_root}"/torch_mlir_package_version ; [ -f "$PKG_VER_FILE" ] && . "$PKG_VER_FILE" export TORCH_MLIR_PYTHON_PACKAGE_VERSION="${TORCH_MLIR_PYTHON_PACKAGE_VERSION:-0.0.1}" @@ -61,7 +61,7 @@ function run() { build_torch_mlir torch_mlir "$python_version" run_audit_wheel torch_mlir "$python_version" ;; - torch-mlir-no-jit-importer) + torch-mlir-no-jit) clean_wheels torch_mlir_no_jit "$python_version" build_torch_mlir_no_jit torch_mlir_no_jit "$python_version" run_audit_wheel_no_jit torch_mlir_no_jit "$python_version"