Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/build_portable_linux_pytorch_wheels.yml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I only considered moving over Linux and we might do Windows in a follow up. But I will at the absolute file an issue. Thanks for bringing Windows back to my attention!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if we don't use the workflows in that way on Windows yet, I'd still like to keep the same structure while we're making these changes, so they don't get too far out of sync.

These two issues stemmed from only updating Linux during initial work:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fully agree! If this goes through, I'd like @HereThereBeDragons do jump onto the Windows workflows to free up some time on my side for other work.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ on:
description: Patch directory name from where to apply existing patches.
required: true
type: string
repository:
description: "Repository to chechout. Otherwise, defaults to `github.repository`."
type: string
Comment thread
marbre marked this conversation as resolved.
ref:
description: "Branch, tag or SHA to checkout. Otherwise, uses the default branch."
type: string
Comment on lines +46 to +48

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little mind-bending. If you omit repository and ref but trigger a release from e.g. users/someone/test-branch, that will checkout the users/someone/test-branch in the workflow run, not main (the "default branch").

Maybe instead of "default branch" say "current branch" or "workflow trigger branch"? Or quote https://github.com/actions/checkout?tab=readme-ov-file#usage

    # The branch, tag or SHA to checkout. When checking out the repository that
    # triggered a workflow, this defaults to the reference or SHA for that event.
    # Otherwise, uses the default branch.
    ref: ''

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense to just copy what actions/checkout has here. Good point!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased to

"Branch, tag or SHA to checkout. Defaults to the reference or SHA that triggered the workflow."

workflow_dispatch:
inputs:
amdgpu_family:
Expand Down Expand Up @@ -113,6 +119,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

- name: Configure Git Identity
run: |
Expand Down Expand Up @@ -208,6 +217,9 @@ jobs:
steps:
- name: Checking out repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

- name: Generating target to run
id: configure
Expand All @@ -228,6 +240,8 @@ jobs:
python_version: ${{ inputs.python_version }}
torch_version: ${{ needs.build_pytorch_wheels.outputs.torch_version }}
pytorch_version: ${{ inputs.pytorch_version }}
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

upload_pytorch_wheels:
name: Release PyTorch Wheels to S3
Expand All @@ -245,6 +259,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

- name: Configure AWS Credentials
if: always()
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/release_portable_linux_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ on:
description: "Staging subdirectory to push the packages"
type: string
default: "v2-staging"
repository:
description: "Repository to chechout. Otherwise, defaults to `github.repository`."
type: string
Comment thread
marbre marked this conversation as resolved.
ref:
description: "Branch, tag or SHA to checkout. Otherwise, uses the default branch."
type: string
# Trigger manually (typically to test the workflow or manually build a release [candidate])
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -63,6 +69,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
Expand Down Expand Up @@ -125,9 +135,14 @@ jobs:
steps:
- name: "Checking out repository"
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.10'

# TODO: We shouldn't be using a cache on actual release branches, but it
# really helps for iteration time.
- name: Enable cache
Expand Down Expand Up @@ -245,7 +260,8 @@ jobs:
"s3_staging_subdir": "${{ env.S3_STAGING_SUBDIR }}",
"cloudfront_url": "${{ needs.setup_metadata.outputs.cloudfront_url }}",
"cloudfront_staging_url": "${{ needs.setup_metadata.outputs.cloudfront_staging_url }}",
"rocm_version": "${{ needs.setup_metadata.outputs.version }}"
"rocm_version": "${{ needs.setup_metadata.outputs.version }}",
"ref": "${{ inputs.ref || '' }}"
}

- name: Save cache
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release_portable_linux_pytorch_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ on:
rocm_version:
description: ROCm version to pip install
type: string
ref:
description: "Branch, tag or SHA to checkout. Otherwise, uses the default branch."
type: string
workflow_dispatch:
inputs:
amdgpu_family:
Expand Down Expand Up @@ -63,6 +66,10 @@ on:
rocm_version:
description: ROCm version to pip install
type: string
ref:
description: "Branch, tag or SHA to checkout. Otherwise, uses the default branch."
type: string
default: ''


permissions:
Expand Down Expand Up @@ -95,3 +102,4 @@ jobs:
rocm_version: ${{ inputs.rocm_version }}
pytorch_version: ${{ matrix.pytorch_version }}
pytorch_patchset: ${{ matrix.pytorch_patchset }}
ref: ${{ inputs.ref || '' }}
9 changes: 9 additions & 0 deletions .github/workflows/test_pytorch_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ on:
description: PyTorch version to checkout. ("nightly", or "release/2.7")
type: string
default: "release/2.7"
repository:
description: "Repository to chechout. Otherwise, defaults to `github.repository`."
type: string
Comment thread
marbre marked this conversation as resolved.
ref:
description: "Branch, tag or SHA to checkout. Otherwise, uses the default branch."
type: string

permissions:
contents: read
Expand All @@ -75,6 +81,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
Expand Down
Loading