-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (86 loc) · 3.1 KB
/
nightly-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Nightly-Release
on:
workflow_dispatch:
inputs:
repo:
description: "repo"
default: "flashinfer-ai/flashinfer"
branch:
description: "branch"
default: "main"
schedule:
- cron: '0 2 * * *'
env:
TORCH_CUDA_ARCH_LIST: "7.5 8.0 8.9 9.0+PTX"
jobs:
build:
outputs:
version: ${{ steps.get_version.outputs.version }}
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12"]
cuda: ["12.1", "12.4"]
torch: ["2.4"]
runs-on: [self-hosted]
steps:
- name: Set default values
id: set_defaults
run: |
echo "[INFO] Event name is '${{ github.event_name }}'"
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "REPO=${{ inputs.repo }}" >> $GITHUB_ENV
echo "BRANCH=${{ inputs.branch }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "REPO=flashinfer-ai/flashinfer" >> $GITHUB_ENV
echo "BRANCH=main" >> $GITHUB_ENV
else
echo "[ERROR] Unsupported event '${{ github.event_name }}'." >&2
exit 1
fi
- run: |
rm -rf flashinfer
git clone -b ${{ env.BRANCH }} --recurse-submodules --depth=1 https://github.com/${{ env.REPO }}
pushd flashinfer
sed -i 's/+cu/\.cu/g' scripts/run-ci-build-wheel.sh
sed -i 's|/ci-cache|/opt/dlami/nvme/flashinfer/github|g' scripts/run-ci-build-wheel.sh
sed -i '/mkdir -p "\$CONDA_pkgs_dirs" "\$XDG_CACHE_HOME"/d' scripts/run-ci-build-wheel.sh
version="$(cat version.txt)"+"$(git rev-parse HEAD | cut -c1-7)"
echo "VERSION=$version" >> $GITHUB_ENV
echo "version=$version" >> $GITHUB_OUTPUT
id: get_version
- name: Build wheel
run: |
pushd flashinfer
docker run --rm -t \
-v "$(pwd)":/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=${{ env.VERSION }} \
-e TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST" \
-e MAX_JOBS=192 \
--user $(id -u):$(id -g) \
pytorch/manylinux-builder:cuda${{ matrix.cuda }} \
bash /app/scripts/run-ci-build-wheel.sh
popd
timeout-minutes: 30
- run: du -h flashinfer/python/dist/*
- uses: actions/upload-artifact@v4
with:
name: wheel-cuda${{ matrix.cuda }}-torch${{ matrix.torch }}-python${{ matrix.python }}
path: flashinfer/python/dist/*
release:
needs: build
runs-on: [self-hosted]
steps:
- uses: actions/download-artifact@v4
with:
path: python/dist/
merge-multiple: true
pattern: wheel-*
- run: ls -lah python/dist/
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.build.outputs.version }}
files: python/dist/flashinfer*.whl