Skip to content

Commit

Permalink
bugfix: Fix release wheel script and remove uninstantiated branches i…
Browse files Browse the repository at this point in the history
…n dispatch (#173)

The release action
[failed](https://github.com/flashinfer-ai/flashinfer/actions/runs/8227731974/job/22501369048)
because
[action-gh-release](https://github.com/softprops/action-gh-release)
action do not support uploading multiple large files at a time:
softprops/action-gh-release#353

This PR changes the behavior of release job to upload artifacts in
multiple batches.

Also, #172 removes the
instantiation of page prefill kernels for `page_size=8`, this PR fixes
the behavior of `DISPATCH_PAGE_SIZE` by removing corresponding branches.
  • Loading branch information
yzh119 authored Mar 11, 2024
1 parent bd5b60a commit 58b0c4a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/release_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,30 @@ jobs:
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer-*.whl
python/dist/flashinfer.*cp38.*.whl
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer.*cp39.*.whl
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer.*cp310.*.whl
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer.*cp311.*.whl
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer-*.tar.gz
- name: Clone wheel index
Expand Down
3 changes: 0 additions & 3 deletions include/flashinfer/utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@
if (page_size == 1) { \
constexpr size_t PAGE_SIZE = 1; \
__VA_ARGS__ \
} else if (page_size == 8) { \
constexpr size_t PAGE_SIZE = 8; \
__VA_ARGS__ \
} else if (page_size == 16) { \
constexpr size_t PAGE_SIZE = 16; \
__VA_ARGS__ \
Expand Down
11 changes: 10 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ def remove_unwanted_pytorch_nvcc_flags():
except ValueError:
pass


class NinjaBuildExtension(torch_cpp_ext.BuildExtension):
def __init__(self, *args, **kwargs) -> None:
# do not override env MAX_JOBS if already exists
Expand All @@ -358,6 +359,7 @@ def __init__(self, *args, **kwargs) -> None:

super().__init__(*args, **kwargs)


if __name__ == "__main__":
remove_unwanted_pytorch_nvcc_flags()
generate_build_meta()
Expand All @@ -380,7 +382,14 @@ def __init__(self, *args, **kwargs) -> None:
],
extra_compile_args={
"cxx": ["-O3"],
"nvcc": ["-O3", "-std=c++17", "--threads", "8", "-Xfatbin", "-compress-all"],
"nvcc": [
"-O3",
"-std=c++17",
"--threads",
"8",
"-Xfatbin",
"-compress-all",
],
},
)
)
Expand Down

0 comments on commit 58b0c4a

Please sign in to comment.