Skip to content

Commit

Permalink
bugfix: Revert "ci: cross python wheel (#662)" (#681)
Browse files Browse the repository at this point in the history
This reverts PR #662 as we found there being some issue with cross
python wheel #669 , we should fix the issue later but we have to revert
it first to unblock v0.2 release job.

cc @xslingcn
  • Loading branch information
yzh119 authored Dec 18, 2024
1 parent d7ac8e3 commit 58a0944
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/release_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
cuda: ["11.8", "12.1", "12.4"]
torch: ["2.2", "2.3", "2.4"]
exclude: # for cuda 12.4, we only support torch 2.4+
Expand All @@ -46,6 +47,7 @@ jobs:
-v "$CI_RUNNER_CACHE_DIR":/ci-cache \
-v "$GITHUB_WORKSPACE":/app \
-e FLASHINFER_CI_CACHE=/ci-cache \
-e FLASHINFER_CI_PYTHON_VERSION=${{ matrix.python }} \
-e FLASHINFER_CI_CUDA_VERSION=${{ matrix.cuda }} \
-e FLASHINFER_CI_TORCH_VERSION=${{ matrix.torch }} \
-e TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST" \
Expand All @@ -58,7 +60,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: wheel-cuda${{ matrix.cuda }}-torch${{ matrix.torch }}
name: wheel-cuda${{ matrix.cuda }}-torch${{ matrix.torch }}-python${{ matrix.python }}
path: dist/*

release:
Expand All @@ -77,7 +79,31 @@ jobs:
with:
tag_name: ${{ inputs.tag_name }}
files: |
dist/flashinfer*.whl
dist/flashinfer*cp38*.whl
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
dist/flashinfer*cp39*.whl
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
dist/flashinfer*cp310*.whl
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
dist/flashinfer*cp311*.whl
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
dist/flashinfer*cp312*.whl
- uses: softprops/action-gh-release@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions scripts/run-ci-build-wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ assert_env() {
}

assert_env FLASHINFER_CI_CACHE
assert_env FLASHINFER_CI_PYTHON_VERSION
assert_env FLASHINFER_CI_CUDA_VERSION
assert_env FLASHINFER_CI_TORCH_VERSION
assert_env TORCH_CUDA_ARCH_LIST
Expand All @@ -25,6 +26,8 @@ CUDA_MAJOR="${FLASHINFER_CI_CUDA_VERSION%.*}"
CUDA_MINOR="${FLASHINFER_CI_CUDA_VERSION#*.}"
TORCH_MAJOR="${FLASHINFER_CI_TORCH_VERSION%.*}"
TORCH_MINOR="${FLASHINFER_CI_TORCH_VERSION#*.}"
PYVER="${FLASHINFER_CI_PYTHON_VERSION//./}"
export PATH="/opt/python/cp${PYVER}-cp${PYVER}/bin:$PATH"

FLASHINFER_LOCAL_VERSION="cu${CUDA_MAJOR}${CUDA_MINOR}torch${FLASHINFER_CI_TORCH_VERSION}"
if [ -n "${FLASHINFER_GIT_SHA}" ]; then
Expand Down
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ def __init__(self, *args, **kwargs) -> None:
"cxx": cxx_flags,
"nvcc": nvcc_flags,
},
py_limited_api=True,
),
torch_cpp_ext.CUDAExtension(
name="flashinfer._kernels_sm90",
Expand All @@ -223,14 +222,12 @@ def __init__(self, *args, **kwargs) -> None:
"cxx": cxx_flags,
"nvcc": nvcc_flags + sm90a_flags,
},
py_limited_api=True,
),
]

setuptools.setup(
version=get_version(),
ext_modules=ext_modules,
cmdclass=cmdclass,
options={"bdist_wheel": {"py_limited_api": "cp38"}},
install_requires=install_requires,
)

0 comments on commit 58a0944

Please sign in to comment.