forked from flagos-ai/FlagGems
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
283 lines (238 loc) · 7.88 KB
/
Copy pathpyproject.toml
File metadata and controls
283 lines (238 loc) · 7.88 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# Copyright 2026 FlagOS Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[build-system]
# setuptools is capped below 77: from 77.0 onward it adopts PEP 639 and emits
# `License-File`, which bumps the wheel to Metadata-Version 2.4. Some package
# indexes (e.g. Nexus) reject 2.4; <77 keeps the pure-Python wheel at 2.2.
#
# setuptools-scm is capped below 10: the 10.x line added an egg_info
# file-finder integration (setuptools_scm/_integration/egg_info.py) that reads
# `ignore_egg_info_in_manifest`, an attribute only present on newer setuptools.
# Combined with the setuptools<77 pin above, `pip install .` then fails during
# "Getting requirements to build wheel" with
# `AttributeError: ignore_egg_info_in_manifest`. 9.x has no such integration.
requires = ["setuptools>=64.0,<77", "setuptools-scm>=8,<10", "wheel==0.46.2"]
build-backend = "setuptools.build_meta"
[project]
name = "flag_gems"
dynamic = ["version"]
description = "FlagGems is a function library written in Triton language."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.10.0"
license = { text = "Apache Software License" }
authors = [
{ name = "Zhixin Li", email = "strongspoon@outlook.com" },
{ name = "Tongxin Bai", email = "waffle.bai@gmail.com" },
{ name = "Yuming Huang", email = "jokmingwong@gmail.com" },
{ name = "Feiyu Chen", email = "iclementine@outlook.com" },
{ name = "Ruilin Yang", email = "rlyanger01@gmail.com"},
{ name = "Zhen Wang", email = "516310189@qq.com"},
{ name = "Hui Guo", email = "sunnycase@live.cn"},
{ name = "Xiaoyan Liu", email = "18811205590@163.com"},
{ name = "Chunlie Men", email = "menchunlei@163.com"},
{ name = "Hang Xiao", email = "vincent.xiao.me@gmail.com"},
{ name = "Yiqun Huang", email = "huangyiqun@mail.bnu.edu.cn"},
{ name = "Jinjin Tian", email = "kiddyjinjin@gmail.com"},
{ name = "Yang Zheng", email = "zhengyang_pku@163.com"},
{ name = "Jinjie Liu", email = "sgjzfzzf@gmail.com"},
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
]
dependencies = [
"packaging>=26.0",
"PyYAML==6.0.1",
"sqlalchemy==2.0.48",
# python 3.10 requires numpy < 2, while upper layer requires numpy>2 ..
"numpy",
]
[project.optional-dependencies]
ascend-cann850 = [
"torch==2.9.0+cpu",
"torch-npu==2.9.0",
]
ascend-cann900 = [
"torch==2.10.0+cpu",
"torch-npu==2.10.0",
]
cambricon-neuware443 = [
"cambricon_dali==0.13.0",
"torch==2.7.1+cpu",
"torch-mlu==1.29.2+torch2.7.1",
"torch-mlu-ops==1.8.0+torch2.7.1",
"numpy==2.2.6",
]
cambricon-neuware472 = [
"numpy==2.2.6",
"pandas==3.0.5",
"torch==2.11.0+cpu",
"torch-mlu==1.33.1+torch2.11.0",
"torch-mlu-ops==1.12.1+torch2.11.0",
]
enflame-tops1910 = [
"pyefml==1.9.10",
"torch==2.10.0+cpu",
"torchaudio==2.10.0+cpu",
"torchvision==0.25.0+cpu",
"torch-gcu==2.10.0+3.7.20260408",
"flash-attn==2.7.2+torch.2.10.0.gcu.3.4.20260506",
]
enflame-tops1106 = [
"enflame-modelopt==3.6.20260615+torch.2.11.0",
"numpy==2.3.5",
"pyefml==1.10.6",
"torch==2.11.0+cpu",
"torchaudio==2.11.0+cpu",
"torchvision==0.26.0+cpu",
"torch-gcu==2.11.0+3.8.20260713",
"torchcodec==3.8.20260624+torch.2.11.0",
"flash-attn==2.7.2+torch.2.11.0.gcu.3.8.20260706",
"tops-extension==3.6.20260529+torch.2.11.0",
"topstx==1.10.6",
]
hygon = [
"torch==2.9.0+das.opt1.dtk2604",
]
iluvatar = [
"torch==2.7.1+corex.4.4.0",
"torchaudio==2.7.1+corex.4.4.0",
"torchvision==0.22.1+corex.4.4.0",
"numpy<2",
]
kunlunxin = [
"apex==0.1",
"benchflow==1.0.0",
"colorama==0.4.6",
"flash_attn==2.4.2+7e2dd4d",
"hydrax==0.1.0",
"hyperparameter==0.5.6",
"psutil==6.1.0",
"regex==2026.4.4",
"torch==2.9.0+cu129",
"torchaudio==2.9.0+cu129",
"torchvision==0.24.0+cu129",
"torch_plugin==0.1.0",
"torch_xray==2.0.4",
"xformers==0.0.29+1e7a8ec.d20260114",
"xmlir==1.0.0.1",
]
metax-maca3720 = [
"torch==2.8.0+metax3.7.2.0",
"torchaudio==2.4.1+metax3.7.2.0",
"torchvision==0.15.1+metax3.7.2.0",
"flash_attn==2.6.3+metax3.7.2.0torch2.8",
"numpy==2.3.5",
]
metax-maca3810 = [
"apex==0.1+metax3.8.1.0",
"flash_attn==2.6.3+metax3.8.1.0torch2.10",
"flashinfer==0.2.6+metax3.8.1.0torch2.10",
"flash_linear_attention==0.5.0+metax3.8.1.0torch2.10",
"flash_mla==1.0.1+metax3.8.1.0torch2.10",
"numpy==2.3.5",
"torch==2.10.0+metax3.8.1.0",
"torchcodec==0.6.0+metax3.8.1.0",
"torchaudio==2.4.1+metax3.8.1.0",
"torchvision==0.25.0+metax3.8.1.0"
]
mthreads-musa436 = [
"torch==2.9.0+musa.4.3.6",
"torch_musa==2.9.0",
"mkl==2024.0.0",
]
mthreads-musa520 = [
"torch==2.9.1+musa5.2.0",
"torch_musa==2.9.1",
"mkl==2024.0.0",
]
nvidia-cuda128 = [
"torch==2.10.0+cu128",
"torchaudio==2.10.0+cu128",
"torchvision==0.25.0+cu128",
]
nvidia-cuda133 = [
"torch==2.11.0+cu130",
"torchaudio==2.11.0+cu130",
"torchvision==0.26.0+cu130",
]
spacemit = [
"torch==2.8.0+spacemit.0",
]
sunrise = [
"torch==2.11.0+cpu",
"torchaudio==2.11.0+cpu",
"torchvision==0.26.0+cpu",
"torch-ptpu==0.2.3+torch2.11",
]
thead = [
"torch==2.9.0+ppu2.0.0.oe",
]
tsingmicro = [
"torch==2.7.0+cpu",
"torchvision==0.22.0+cpu",
"torchaudio==2.7.0+cpu",
"torch_txda==0.1.0+20260615.37ba6bbd",
"txops==0.1.0+20260508.60287151",
]
# Test packages
test = [
"distro==1.9.0",
"coverage==7.13.5",
"openpyxl==3.1.5",
"pandas==2.3.3",
"pytest==9.0.3",
"pytest-md-report==0.8.0",
"scipy>=1.15.3",
]
# Package for running example tests
example = [
"transformers>=4.40.2",
]
# C++ wrapped operators, distributed as per-vendor native extension packages.
# `pip install flag-gems[cpp-cuda]` pulls in the matching native wheel, which
# drops its .so files into the flag_gems/ namespace.
cpp-cuda = ["flag-gems-cpp-cuda"]
cpp-musa = ["flag-gems-cpp-musa"]
cpp-npu = ["flag-gems-cpp-npu"]
cpp-gcu = ["flag-gems-cpp-gcu"]
cpp-ix = ["flag-gems-cpp-ix"]
[project.urls]
Repository = "https://github.com/flagos-ai/FlagGems"
Documentation = "https://flagos-ai.github.io/FlagGems"
"Bug Tracker" = "https://github.com/flagos-ai/FlagGems/issues"
[project.scripts]
# Top-level module (NOT flag_gems._setup): importing the flag_gems package
# pulls in torch and triton at load time, but this bootstrap CLI runs *before*
# those are installed, so its entry point must not import the package.
flaggems-setup = "flaggems_setup:main"
# Package discovery (including shipping the tests/ and benchmark/ suites under
# collision-safe names) is defined in setup.py, so it is intentionally omitted
# here — declaring `packages` in both places is an error.
flaggems-flagtune-pretune = "flag_gems.flagtune.cli.pretune:main"
flaggems-flagtune-train = "flag_gems.flagtune.cli.train:main"
flaggems-flagtune-compare = "flag_gems.flagtune.cli.compare:main"
[tool.setuptools.package-data]
"flag_gems" = ["backends.yaml"]
"flag_gems.runtime" = ["*/**/*.yaml"]
"flag_gems.flagtune.contracts" = ["configs/*.yaml"]
[tool.setuptools_scm]
write_to = "src/flag_gems/_version.py"
version_scheme = "no-guess-dev"
[tool.uv]
# Tell 'uv' that each index has an equal importance for each package,
# in other words, don't treat the first index with a matching package
# as the best one.
index-strategy = "unsafe-best-match"