Skip to content

Commit d01d333

Browse files
allenwang28facebook-github-bot
authored andcommitted
Build with nightly Torch instead of the latest (#1681)
Summary: Changes in the PyTorch C++ layer affect Monarch's tensor engine builds. Without this change, the CI builds will pick up the latest PyTorch through build-requirements.txt. This diff removes this dependency. We see this affecting #1680 Reviewed By: amirafzali Differential Revision: D85670693
1 parent 86fba83 commit d01d333

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

.github/workflows/build-cpu.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ jobs:
2929
# Setup build environment (conda + system deps + rust + build deps)
3030
setup_build_environment
3131
32+
# Install torch nightly (CPU version)
33+
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
34+
3235
# Build monarch (No tensor engine, CPU version)
3336
USE_TENSOR_ENGINE=0 python setup.py bdist_wheel

.github/workflows/build-cuda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
3434
# Setup build environment (conda + system deps + rust + build deps)
3535
setup_build_environment
36+
pip install ${{ matrix.torch-spec }}
3637
3738
# Setup Tensor Engine
3839
setup_tensor_engine

.github/workflows/test-gpu-python.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ jobs:
4545
# Setup CUDA environment and library paths
4646
setup_cuda_environment
4747
48+
# Install torch nightly before installing the wheel,
49+
# so that we can test the wheel against the latest nightly
50+
pip install ${{ matrix.torch-spec }}
51+
4852
# Install the built wheel from artifact
4953
install_wheel_from_artifact
5054

build-requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
torch
1+
# torch is also a dependency here, but we want to ensure that
2+
# we're building against the PyTorch index for nightly.
23
setuptools
34
setuptools-rust
45
wheel

0 commit comments

Comments
 (0)