From 58b0c4a4f71fed101d1ff8ca17006fc873cd8043 Mon Sep 17 00:00:00 2001 From: Zihao Ye Date: Mon, 11 Mar 2024 03:28:39 -0700 Subject: [PATCH] bugfix: Fix release wheel script and remove uninstantiated branches in 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: https://github.com/softprops/action-gh-release/issues/353 This PR changes the behavior of release job to upload artifacts in multiple batches. Also, https://github.com/flashinfer-ai/flashinfer/pull/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. --- .github/workflows/release_wheel.yml | 25 ++++++++++++++++++++++++- include/flashinfer/utils.cuh | 3 --- python/setup.py | 11 ++++++++++- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index ce5989ad..bdea974a 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -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 diff --git a/include/flashinfer/utils.cuh b/include/flashinfer/utils.cuh index 602130d7..9a83c316 100644 --- a/include/flashinfer/utils.cuh +++ b/include/flashinfer/utils.cuh @@ -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__ \ diff --git a/python/setup.py b/python/setup.py index bb3ef10e..78f7d488 100644 --- a/python/setup.py +++ b/python/setup.py @@ -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 @@ -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() @@ -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", + ], }, ) )