Skip to content

Commit 1306d11

Browse files
authored
[CI/CD] Add torch 2.2.0 wheels (#110)
Fix issue #105
1 parent 6c6c44a commit 1306d11

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/release_wheel.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ on:
1919

2020
env:
2121
TORCH_CUDA_ARCH_LIST: "8.0 8.6 8.9 9.0+PTX"
22-
FLASHINFER_CI_TORCH_VERSION: "2.1.0"
2322

2423
jobs:
2524
build:
@@ -28,6 +27,7 @@ jobs:
2827
matrix:
2928
python: ["3.10", "3.11"]
3029
cuda: ["11.8", "12.1"]
30+
torch: ["2.1.0", "2.2.0"]
3131
runs-on: [self-hosted]
3232
steps:
3333
- uses: actions/checkout@v4
@@ -43,7 +43,7 @@ jobs:
4343
-v "$GITHUB_WORKSPACE":/app \
4444
-e FLASHINFER_CI_PYTHON_VERSION=${{ matrix.python }} \
4545
-e FLASHINFER_CI_CUDA_VERSION=${{ matrix.cuda }} \
46-
-e FLASHINFER_CI_TORCH_VERSION=$FLASHINFER_CI_TORCH_VERSION \
46+
-e FLASHINFER_CI_TORCH_VERSION=${{ matrix.torch }} \
4747
-e FLASHINFER_BUILD_VERSION=$version \
4848
-e TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST" \
4949
--user $CI_UID:$CI_GID \
@@ -54,7 +54,7 @@ jobs:
5454

5555
- uses: actions/upload-artifact@v4
5656
with:
57-
name: wheel-cuda${{ matrix.cuda }}-python${{ matrix.python }}
57+
name: wheel-cuda${{ matrix.cuda }}-torch${{ matrix.torch }}-python${{ matrix.python }}
5858
path: python/dist/*
5959

6060
release:
@@ -90,8 +90,8 @@ jobs:
9090
for path in sorted(pathlib.Path("python/dist").glob("*.whl")):
9191
with open(path, "rb") as f:
9292
sha256 = hashlib.sha256(f.read()).hexdigest()
93-
ver, cu = re.findall(r"flashinfer-([0-9.]+)\+cu(\d+)-", path.name)[0]
94-
with open(f"flashinfer-whl/cu{cu}/flashinfer/index.html", "a") as f:
93+
ver, cu, torch = re.findall(r"flashinfer-([0-9.]+)\+cu(\d+)\+torch([0-9.]+)-", path.name)[0]
94+
with open(f"flashinfer-whl/cu{cu}/torch{torch}/flashinfer/index.html", "a") as f:
9595
f.write(f'<a href="https://github.com/flashinfer-ai/flashinfer/releases/download/v{ver}/{path.name}#sha256={sha256}">{path.name}</a><br>\n')
9696
9797
- name: Push wheel index

scripts/run-ci-build-wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ echo "::endgroup::"
4040

4141
echo "::group::Build wheel for FlashInfer"
4242
cd "$PROJECT_ROOT/python"
43-
MAX_JOBS=32 FLASHINFER_BUILD_VERSION="${FLASHINFER_BUILD_VERSION}+cu${CUDA_MAJOR}${CUDA_MINOR}" python -m build --no-isolation
43+
MAX_JOBS=32 FLASHINFER_BUILD_VERSION="${FLASHINFER_BUILD_VERSION}+cu${CUDA_MAJOR}${CUDA_MINOR}+torch${FLASHINFER_CI_TORCH_VERSION}" python -m build --no-isolation
4444
rm -f dist/*.tar.gz
4545
python -m build --no-isolation --sdist
4646
echo "::endgroup::"

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.1
1+
0.0.2

0 commit comments

Comments
 (0)