Skip to content

Commit 21cc8ca

Browse files
thomasywangfacebook-github-bot
authored andcommitted
Fix missing pip install torch in Github CI (#1828)
Summary: I think we missed some spots in D85670693 Reviewed By: dulinriley Differential Revision: D86789995
1 parent 9f0274a commit 21cc8ca

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.github/workflows/publish_release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
include:
2222
- name: 4xlarge
2323
runs-on: linux.g5.4xlarge.nvidia.gpu
24-
install-args: '--pre --extra-index-url https://download.pytorch.org/whl/test/cu128'
24+
torch-spec: '--pre torch --index-url https://download.pytorch.org/whl/nightly/cu128'
2525
gpu-arch-type: "cuda"
2626
gpu-arch-version: "12.8"
2727
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
@@ -34,7 +34,12 @@ jobs:
3434
upload-artifact: monarch-${{ matrix.python-version }}-${{ matrix.gpu-arch-type }}${{ matrix.gpu-arch-version }}
3535
script: |
3636
source scripts/common-setup.sh
37-
setup_build_environment ${{ matrix.python-version }} "${{ matrix.install-args }}"
37+
setup_build_environment ${{ matrix.python-version }}
38+
39+
# Install torch nightly before installing the wheel,
40+
# so that we can test the wheel against the latest nightly
41+
pip install ${{ matrix.torch-spec }}
42+
pip install -r build-requirements.txt
3843
3944
# Setup Tensor Engine dependencies
4045
setup_tensor_engine

.github/workflows/wheels.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
include:
2222
- name: 4xlarge
2323
runs-on: linux.g5.4xlarge.nvidia.gpu
24-
install-args: '--pre --extra-index-url https://download.pytorch.org/whl/nightly/cu126'
24+
torch-spec: '--pre torch --index-url https://download.pytorch.org/whl/nightly/cu126'
2525
gpu-arch-type: "cuda"
2626
gpu-arch-version: "12.6"
2727
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
@@ -34,7 +34,12 @@ jobs:
3434
upload-artifact: monarch-${{ matrix.python-version }}-${{ matrix.gpu-arch-type }}${{ matrix.gpu-arch-version }}
3535
script: |
3636
source scripts/common-setup.sh
37-
setup_build_environment ${{ matrix.python-version }} "${{ matrix.install-args }}"
37+
setup_build_environment ${{ matrix.python-version }}
38+
39+
# Install torch nightly before installing the wheel,
40+
# so that we can test the wheel against the latest nightly
41+
pip install ${{ matrix.torch-spec }}
42+
pip install -r build-requirements.txt
3843
3944
# Setup Tensor Engine dependencies
4045
setup_tensor_engine

scripts/common-setup.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ setup_pytorch_with_headers() {
107107
# Common setup for build workflows (environment + system deps + rust)
108108
setup_build_environment() {
109109
local python_version=${1:-3.10}
110-
local install_args=${2:-}
111110
setup_conda_environment "${python_version}"
112111
install_system_dependencies
113112
setup_rust_toolchain

0 commit comments

Comments
 (0)