mirror of https://github.com/llvm/torch-mlir
CI: create PR for RollPyTorch updates (#2106)
Currently, we run just the Linux in-tree tests when the RollPyTorch workflow runs, but this is insufficient since WHL files for macOS or Windows are sometimes not uploaded by PyTorch, causing the RollPyTorch action to pass but all subsequent torch-mlir CI tests to fail because of the broken build. The easiest way to validate the RollPyTorch action on all platforms is to run the standard set of tests that we run for each submitted PR, so this patch makes the RollPyTorch action submit a PR instead of committing the changes to the main branch directly. The PR is assigned to a handful of folks for review, although this can be changed in the future.pull/2111/head
parent
d7614c261d
commit
377720af87
|
@ -97,7 +97,15 @@ jobs:
|
|||
torchvision version: ${{ env.PTVISION_RELEASE }}
|
||||
```
|
||||
|
||||
- name: Push changes to main branch
|
||||
- name: Update PyTorch Build Cache (if running on main branch)
|
||||
if: github.ref_name == 'main'
|
||||
id: cache-pytorch
|
||||
uses: ashay/cache@v1
|
||||
with:
|
||||
path: ${{ github.workspace }}/build_tools/python_deploy/wheelhouse
|
||||
key: ${{ runner.os }}-pytorch-${{ env.PT_HASH }}
|
||||
|
||||
- name: Commit changes locally
|
||||
if: env.PT_HASH_CHANGED != '0'
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}
|
||||
|
@ -106,13 +114,25 @@ jobs:
|
|||
git fetch --recurse-submodules=no
|
||||
git checkout main
|
||||
git pull origin main
|
||||
git checkout -b rollpytorch/${{ env.PT_RELEASE }}
|
||||
git add pytorch-hash.txt pytorch-requirements.txt torchvision-requirements.txt lib/Dialect/Torch/Transforms/AbstractInterpLibrary.cpp include/torch-mlir/Dialect/Torch/IR/GeneratedTorchOps.td
|
||||
git diff --cached --exit-code || (git commit -m "update PyTorch version to ${{ env.PT_RELEASE }}" && git push --set-upstream origin main)
|
||||
git diff --cached --exit-code || git commit -m "update PyTorch version to ${{ env.PT_RELEASE }}"
|
||||
|
||||
- name: Update PyTorch Build Cache (if running on main branch)
|
||||
if: github.ref_name == 'main'
|
||||
id: cache-pytorch
|
||||
uses: ashay/cache@v1
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@v5.0.1
|
||||
with:
|
||||
path: ${{ github.workspace }}/build_tools/python_deploy/wheelhouse
|
||||
key: ${{ runner.os }}-pytorch-${{ env.PT_HASH }}
|
||||
author: Roll PyTorch Action <torch-mlir@users.noreply.github.com>
|
||||
branch: rollpytorch/${{ env.PT_RELEASE }}
|
||||
body: |
|
||||
torch version: ${{ env.PT_RELEASE }}
|
||||
torch commit hash: ${{ env.PT_HASH }}
|
||||
torchvision version: ${{ env.PTVISION_RELEASE }}
|
||||
commit-message: |
|
||||
update PyTorch version to ${{ env.PT_RELEASE }}
|
||||
|
||||
- torch version: ${{ env.PT_RELEASE }}
|
||||
- torch commit hash: ${{ env.PT_HASH }}
|
||||
- torchvision version: ${{ env.PTVISION_RELEASE }}
|
||||
committer: Roll PyTorch Action <torch-mlir@users.noreply.github.com>
|
||||
title: update PyTorch version to ${{ env.PT_RELEASE }}
|
||||
reviewers: ashay, powderluv, vivekkhandelwal1
|
||||
|
|
Loading…
Reference in New Issue