Skip to content

Commit 143228e

Browse files
TroyGardenfacebook-github-bot
authored andcommitted
add dispatch option for release channel (#3375)
Summary: Pull Request resolved: #3375 # context * current the github CI (cpu and gpu) always uses nightly build for torch and fbgemm * there's need to verify the torchrec library during release * added dispatch option to select the channel (nightly, release, test) for torch and fbgemm Reviewed By: spmex Differential Revision: D82362972 fbshipit-source-id: d436d3a854ad7fc992b822a1704b7e03100d130a
1 parent b67f6ae commit 143228e

File tree

4 files changed

+46
-19
lines changed

4 files changed

+46
-19
lines changed

.github/workflows/unittest_ci.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
# only run tests on main branch & nightly; release should be triggered manually
1010
- nightly
1111
- main
12-
tags:
13-
# Release candidate tags look like: v1.11.0-rc1
14-
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
1512
paths-ignore:
1613
- "docs/*"
1714
- "third_party/*"
@@ -24,6 +21,15 @@ on:
2421
- .gitignore
2522
- "*.md"
2623
workflow_dispatch:
24+
inputs:
25+
channel:
26+
description: "Channel to use for torch and fbgemm"
27+
required: true
28+
type: choice
29+
options:
30+
- release
31+
- nightly
32+
- test
2733

2834
jobs:
2935
build_test:
@@ -76,15 +82,23 @@ jobs:
7682
conda info
7783
python --version
7884
conda run -n build_binary python --version
85+
if [[ "${{ inputs.channel }}" = "release" ]]; then
86+
index_url=https://download.pytorch.org/whl/${{ matrix.cuda-tag }}
87+
elif [ -z "${{ inputs.channel }}" ]; then
88+
index_url=https://download.pytorch.org/whl/nightly/${{ matrix.cuda-tag }}
89+
else
90+
index_url=https://download.pytorch.org/whl/${{ inputs.channel }}/${{ matrix.cuda-tag }}
91+
fi
92+
echo "index_url: $index_url"
7993
conda run -n build_binary \
80-
pip install torch --index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda-tag }}
94+
pip install torch --index-url $index_url
8195
conda run -n build_binary \
8296
python -c "import torch; print(torch.__version__)"
8397
echo "torch succeeded"
8498
conda run -n build_binary \
8599
python -c "import torch.distributed"
86100
conda run -n build_binary \
87-
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda-tag }}
101+
pip install fbgemm-gpu --index-url $index_url
88102
conda run -n build_binary \
89103
python -c "import fbgemm_gpu; print(fbgemm_gpu.__version__)"
90104
echo "fbgemm_gpu succeeded"

.github/workflows/unittest_ci_cpu.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
# only run tests on main branch & nightly; release should be triggered manually
1010
- nightly
1111
- main
12-
tags:
13-
# Release candidate tags look like: v1.11.0-rc1
14-
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
1512
paths-ignore:
1613
- "docs/*"
1714
- "third_party/*"
@@ -24,6 +21,15 @@ on:
2421
- .gitignore
2522
- "*.md"
2623
workflow_dispatch:
24+
inputs:
25+
channel:
26+
description: "Channel to use for torch and fbgemm"
27+
required: true
28+
type: choice
29+
options:
30+
- release
31+
- nightly
32+
- test
2733

2834
jobs:
2935
build_test:
@@ -66,15 +72,23 @@ jobs:
6672
conda info
6773
python --version
6874
conda run -n build_binary python --version
75+
if [[ "${{ inputs.channel }}" = "release" ]]; then
76+
index_url=https://download.pytorch.org/whl/cpu
77+
elif [ -z "${{ inputs.channel }}" ]; then
78+
index_url=https://download.pytorch.org/whl/nightly/cpu
79+
else
80+
index_url=https://download.pytorch.org/whl/${{ inputs.channel }}/cpu
81+
fi
82+
echo "index_url: $index_url"
6983
conda run -n build_binary \
70-
pip install torch --index-url https://download.pytorch.org/whl/nightly/cpu
84+
pip install torch --index-url $index_url
7185
conda run -n build_binary \
7286
python -c "import torch; print(torch.__version__)"
7387
echo "torch succeeded"
7488
conda run -n build_binary \
7589
python -c "import torch.distributed"
7690
conda run -n build_binary \
77-
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu
91+
pip install fbgemm-gpu --index-url $index_url
7892
conda run -n build_binary \
7993
python -c "import fbgemm_gpu; print(fbgemm_gpu.__version__)"
8094
echo "fbgemm_gpu succeeded"

README.MD

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Check out the [Getting Started](https://pytorch.org/torchrec/setup-torchrec.html
4040

4141
1. Install pytorch. See [pytorch documentation](https://pytorch.org/get-started/locally/).
4242
```
43-
CUDA 12.8
44-
45-
pip install torch --index-url https://download.pytorch.org/whl/nightly/cu128
46-
4743
CUDA 12.6
4844
4945
pip install torch --index-url https://download.pytorch.org/whl/nightly/cu126
5046
47+
CUDA 12.8
48+
49+
pip install torch --index-url https://download.pytorch.org/whl/nightly/cu128
50+
5151
CUDA 12.9
5252
5353
pip install torch --index-url https://download.pytorch.org/whl/nightly/cu129
@@ -65,14 +65,14 @@ Check out the [Getting Started](https://pytorch.org/torchrec/setup-torchrec.html
6565

6666
3. Install FBGEMM.
6767
```
68-
CUDA 12.8
69-
70-
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cu128
71-
7268
CUDA 12.6
7369
7470
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cu126
7571
72+
CUDA 12.8
73+
74+
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cu128
75+
7676
CUDA 12.9
7777
7878
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cu129

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def main(argv: List[str]) -> None:
111111
"Intended Audience :: Science/Research",
112112
"License :: OSI Approved :: BSD License",
113113
"Programming Language :: Python :: 3",
114-
"Programming Language :: Python :: 3.9",
115114
"Programming Language :: Python :: 3.10",
116115
"Programming Language :: Python :: 3.11",
117116
"Programming Language :: Python :: 3.12",

0 commit comments

Comments
 (0)