forked from HanGuo97/flute
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (88 loc) · 3.35 KB
/
Copy pathwheels.yaml
File metadata and controls
107 lines (88 loc) · 3.35 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# This workflow will upload a Python Package to Release asset
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions
name: Create Release
on:
workflow_dispatch:
jobs:
wheel:
name: Build wheels on ${{ matrix.os }} python${{ matrix.python-version }} torch${{ matrix.pytorch-version }} cuda${{ matrix.cuda-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-22.04']
python-version: ['3.10', '3.11', '3.12', '3.13']
pytorch-version: ['2.7.0', '2.8.0', '2.9.0', '2.10.0', '2.11.0', '2.12.0']
cuda-version: ['12.6']
# exclude:
# - pytorch-version: '2.7.0'
# python-version: '3.14'
# - pytorch-version: '2.8.0'
# python-version: '3.14'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Linux Env
if: ${{ runner.os == 'Linux' }}
run: |
bash -x .github/workflows/scripts/env.sh
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 12
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- name: Install CUDA ${{ matrix.cuda-version }}
run: |
bash -x .github/workflows/scripts/cuda-install.sh ${{ matrix.cuda-version }} ${{ matrix.os }}
- name: Clean APT cache
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
- name: Install PyTorch ${{ matrix.pytorch-version }} with CUDA ${{ matrix.cuda-version }}
run: |
bash -x .github/workflows/scripts/pytorch-install.sh ${{ matrix.python-version }} ${{ matrix.pytorch-version }} ${{ matrix.cuda-version }}
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# Wheel metadata: setup.py adds torch>=X.Y.Z,<X.(Y+1).0 from the installed PyTorch (matrix.pytorch-version).
- name: Build wheel
shell: bash
run: |
bash -x .github/workflows/scripts/cutlass-install.sh
bash -x .github/workflows/scripts/build.sh ${{ matrix.python-version }} ${{ matrix.cuda-version }}
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ matrix.cuda-version }}
path: ./wheelhouse/*.whl
consolidate-wheels:
needs: [wheel]
runs-on: ubuntu-latest
steps:
- name: Download all wheel artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Consolidate wheels into a single folder
run: |
mkdir -p consolidated_wheels
find dist -name '*.whl' -exec cp {} consolidated_wheels/ \;
ls -l consolidated_wheels
- name: Upload consolidated wheels
uses: actions/upload-artifact@v4
with:
name: built-wheels
path: consolidated_wheels