Skip to content

Commit

Permalink
Add options to choose custom PyTorch version for CI (pytorch#3432)
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookresearch/FBGEMM#528

- Add options to choose custom PyTorch version for CI when running CI in dispatch mode

Pull Request resolved: pytorch#3432

Reviewed By: spcyppt

Differential Revision: D66693117

Pulled By: q10

fbshipit-source-id: cbec5ba67e3d462a8dea40d91200cc9dcba0c5bd
  • Loading branch information
q10 authored and facebook-github-bot committed Dec 3, 2024
1 parent a821f59 commit 31ca26d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 10 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/fbgemm_gpu_ci_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
#
workflow_dispatch:
inputs:
pytorch_channel_version:
description: Package Channel + Version to Use for PyTorch Installation, in `<channel>[/<version>]` Format
type: string
required: false
default: ""
publish_to_pypi:
description: Publish Artifact to PyPI
type: boolean
Expand Down Expand Up @@ -97,7 +102,7 @@ jobs:
run: . $PRELUDE; install_build_tools $BUILD_ENV

- name: Install PyTorch-CPU Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cpu
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} cpu

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down Expand Up @@ -170,7 +175,7 @@ jobs:
run: . $PRELUDE; install_cxx_compiler $BUILD_ENV ${{ matrix.compiler }}

- name: Install PyTorch-CPU Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cpu
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} cpu

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/fbgemm_gpu_ci_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
#
workflow_dispatch:
inputs:
pytorch_channel_version:
description: Package Channel + Version to Use for PyTorch Installation, in `<channel>[/<version>]` Format
type: string
required: false
default: ""
publish_to_pypi:
description: Publish Artifact to PyPI
type: boolean
Expand Down Expand Up @@ -102,7 +107,7 @@ jobs:

# Install via PIP to avoid defaulting to the CPU variant if the GPU variant of the day is not ready
- name: Install PyTorch Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda/${{ matrix.cuda-version }}
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} cuda/${{ matrix.cuda-version }}

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down Expand Up @@ -194,7 +199,7 @@ jobs:

# Install via PIP to avoid defaulting to the CPU variant if the GPU variant of the day is not ready
- name: Install PyTorch Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda/${{ matrix.cuda-version }}
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} cuda/${{ matrix.cuda-version }}

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/fbgemm_gpu_ci_genai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
#
workflow_dispatch:
inputs:
pytorch_channel_version:
description: Package Channel + Version to Use for PyTorch Installation, in `<channel>[/<version>]` Format
type: string
required: false
default: ""
publish_to_pypi:
description: Publish Artifact to PyPI
type: boolean
Expand Down Expand Up @@ -102,7 +107,7 @@ jobs:

# Install via PIP to avoid defaulting to the CPU variant if the GPU variant of the day is not ready
- name: Install PyTorch Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda/${{ matrix.cuda-version }}
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} cuda/${{ matrix.cuda-version }}

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down Expand Up @@ -193,7 +198,7 @@ jobs:

# Install via PIP to avoid defaulting to the CPU variant if the GPU variant of the day is not ready
- name: Install PyTorch Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda/${{ matrix.cuda-version }}
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} cuda/${{ matrix.cuda-version }}

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/fbgemm_gpu_ci_genai_generic_infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ on:
# Manual Trigger
#
workflow_dispatch:
inputs:
pytorch_channel_version:
description: Package Channel + Version to Use for PyTorch Installation, in `<channel>[/<version>]` Format
type: string
required: false
default: ""

concurrency:
# Cancel previous runs in the PR if a new commit is pushed
Expand Down Expand Up @@ -92,7 +98,7 @@ jobs:

# Install via PIP to avoid defaulting to the CPU variant if the GPU variant of the day is not ready
- name: Install PyTorch Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda/${{ matrix.cuda-version }}
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} cuda/${{ matrix.cuda-version }}

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down Expand Up @@ -184,7 +190,7 @@ jobs:
run: . $PRELUDE; install_cuda $BUILD_ENV ${{ matrix.cuda-version }}

- name: Install PyTorch Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda/${{ matrix.cuda-version }}
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} cuda/${{ matrix.cuda-version }}

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/fbgemm_gpu_ci_rocm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
#
workflow_dispatch:
inputs:
pytorch_channel_version:
description: Package Channel + Version to Use for PyTorch Installation, in `<channel>[/<version>]` Format
type: string
required: false
default: ""
publish_to_pypi:
description: Publish Artifact to PyPI
type: boolean
Expand Down Expand Up @@ -104,7 +109,7 @@ jobs:
run: . $PRELUDE; install_rocm_ubuntu $BUILD_ENV ${{ matrix.rocm-version }}

- name: Install PyTorch-ROCm Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly rocm/${{ matrix.rocm-version }}
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} rocm/${{ matrix.rocm-version }}

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down Expand Up @@ -185,7 +190,7 @@ jobs:
run: . $PRELUDE; install_rocm_amdsmi_ubuntu $BUILD_ENV

- name: Install PyTorch-ROCm Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly rocm/${{ matrix.rocm-version }}
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch_channel_version) || 'nightly' }} rocm/${{ matrix.rocm-version }}

- name: Collect PyTorch Environment Info
if: ${{ success() || failure() }}
Expand Down

0 comments on commit 31ca26d

Please sign in to comment.