Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize packaging #643

Merged
merged 13 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions .github/workflows/release_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,74 +43,72 @@ jobs:
- name: Build wheel
run: |
chown -R $CI_UID:$CI_GID "$GITHUB_WORKSPACE"
version="$(cat version.txt)"
docker run --rm -t \
-v "$CI_RUNNER_CACHE_DIR":/ci-cache \
-v "$GITHUB_WORKSPACE":/app \
-e FLASHINFER_CI_PYTHON_VERSION=${{ matrix.python }} \
-e FLASHINFER_CI_CUDA_VERSION=${{ matrix.cuda }} \
-e FLASHINFER_CI_TORCH_VERSION=${{ matrix.torch }} \
-e FLASHINFER_BUILD_VERSION=$version \
-e TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST" \
-e MAX_JOBS=128 \
--user $CI_UID:$CI_GID \
pytorch/manylinux-builder:cuda${{ matrix.cuda }} \
bash /app/scripts/run-ci-build-wheel.sh
timeout-minutes: 120
- run: du -h python/dist/*
- run: du -h dist/*

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

release:
needs: build
runs-on: [self-hosted]
steps:
- uses: actions/download-artifact@v4
with:
path: python/dist/
path: dist/
merge-multiple: true
pattern: wheel-*

- run: ls -lah python/dist/
- run: ls -lah dist/

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer*cp38*.whl
dist/flashinfer*cp38*.whl

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer*cp39*.whl
dist/flashinfer*cp39*.whl

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer*cp310*.whl
dist/flashinfer*cp310*.whl

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer*cp311*.whl
dist/flashinfer*cp311*.whl

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer*cp312*.whl
dist/flashinfer*cp312*.whl

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag_name }}
files: |
python/dist/flashinfer-*.tar.gz
dist/flashinfer-*.tar.gz

- name: Clone wheel index
run: git clone https://oauth2:${WHL_TOKEN}@github.com/flashinfer-ai/whl.git flashinfer-whl
Expand Down
24 changes: 7 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
# ci
flashinfer-whl/
python/dist
dist/

# Compile commands json file
compile_commands.json

# Generated inst files
src/dispatch.inc

# Generated cu files
# Generated files
csrc/generated/
docs/generated/
flashinfer/_build_meta.py
flashinfer/data/
flashinfer/jit/aot_config.py
src/generated/
python/csrc/generated/
python/flashinfer/_build_meta.py
python/flashinfer/jit/aot_config.py
python/csrc-aot/generated/

# Package files
python/flashinfer/data/
python/flashinfer/version.txt
python/MANIFEST.in

# Generated documentation files
docs/generated

# DS_Store files
.DS_store
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ repos:
- id: clang-format
types_or: [c++, c, cuda]
exclude: |
(?x)^(3rdparty/.* src/generated/.* python/flashinfer/jit/aot_config.py)$
(?x)^(3rdparty/.* src/generated/.* flashinfer/jit/aot_config.py)$

- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
Expand Down
Loading