forked from flashinfer-ai/flashinfer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
156 lines (143 loc) · 4.61 KB
/
Copy pathpyproject.toml
File metadata and controls
156 lines (143 loc) · 4.61 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
# Copyright (c) 2024 by FlashInfer team.
#
# 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.
[project]
name = "flashinfer-python"
dynamic = ["version", "dependencies"]
description = "FlashInfer: Kernel Library for LLM Serving"
requires-python = ">=3.10,<4.0"
authors = [{ name = "FlashInfer team" }]
license = "Apache-2.0"
readme = "README.md"
urls = { Homepage = "https://github.com/flashinfer-ai/flashinfer" }
license-files = ["LICENSE", "LICENSE*.txt"]
[project.optional-dependencies]
cu12 = ["nvidia-cutlass-dsl>=4.5.0"]
cu13 = ["nvidia-cutlass-dsl[cu13]>=4.5.0"]
# DEPRECATED alias, kept so existing `pip install ".[nvep]"` commands keep
# working. The moe_ep runtime deps (cuda-python, nccl4py) are now part of the
# BASE dependencies (requirements.txt) and the NIXL-EP submodule build runs by
# default (best-effort) on `pip install .` — see the moe_ep section at the top
# of build_backend.py. libnccl comes from torch's own nvidia-nccl-cu13 pin;
# the >=2.30.7 B200 floor is enforced at runtime (moe_ep/_validators.py) and
# upgraded --no-deps by the build hook on source installs. Opt out of the
# native build with BUILD_NVEP=0 (or BUILD_NIXL_EP=0 / BUILD_NCCL_EP=0).
nvep = []
[project.scripts]
flashinfer = "flashinfer.__main__:cli"
[build-system]
requires = ["setuptools>=77", "packaging>=24", "apache-tvm-ffi>=0.1.6,!=0.1.8,!=0.1.8.post0,<0.2"]
build-backend = "build_backend"
backend-path = ["."]
[tool.codespell]
ignore-words-list = "3nd"
skip = ["build", "3rdparty", "dist", ".venv"]
[tool.setuptools]
include-package-data = false
py-modules = ["build_backend", "build_utils"]
[tool.setuptools.dynamic]
version = { attr = "flashinfer._build_meta.__version__" }
dependencies = { file = ["requirements.txt"] }
[tool.setuptools.packages.find]
where = ["."]
include = ["flashinfer*"]
exclude = ["flashinfer-jit-cache*", "flashinfer-cubin*"]
[tool.setuptools.package-dir]
"flashinfer.data" = "."
"flashinfer.data.cutlass" = "3rdparty/cutlass"
"flashinfer.data.spdlog" = "3rdparty/spdlog"
"flashinfer.data.cccl" = "3rdparty/cccl"
[tool.setuptools.package-data]
"flashinfer" = ["_build_meta.py"]
# JIT sources for the blk64 BSA kernel extension (compiled on-demand via
# torch.utils.cpp_extension.load in flashinfer/cute_dsl/sparse/blk64/loader.py).
# These live inside the package tree rather than csrc/, so they must be
# registered explicitly or they won't be included in non-editable installs.
"flashinfer.cute_dsl.sparse.blk64" = [
"*.cpp",
"*.cu",
"*.h",
"*.hpp",
"instantiations/*.cu",
]
"flashinfer.data" = ["csrc/**", "include/**"]
"flashinfer.data.cutlass" = ["include/**", "tools/util/include/**"]
"flashinfer.data.spdlog" = ["include/**"]
"flashinfer.data.cccl" = ["cub/cub/**", "libcudacxx/include/**", "thrust/thrust/**"]
# EP backend shared libraries built in-tree from 3rdparty/nixl by default
# during `pip install` (opt out with BUILD_NIXL_EP=0). The .so files live
# under flashinfer/moe_ep/{nixl_ep,nccl_ep}/_libs/ (gitignored; populated by
# build_backend._build_nvep_if_enabled).
"flashinfer.moe_ep.nixl_ep" = ["_libs/**"]
"flashinfer.moe_ep.nccl_ep" = ["_libs/*.so*"]
[tool.mypy]
files = ["flashinfer"]
ignore_missing_imports = true
show_column_numbers = true
show_error_context = true
follow_imports = "skip"
ignore_errors = false
strict_optional = false
exclude = [
"flashinfer-cubin/",
"flashinfer-jit-cache/",
"3rdparty/",
"flashinfer/data/cutlass/",
"build/",
]
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
# "UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
# "I",
]
ignore = [
# Module level import not at top of file
"E402",
# star imports
"F405",
"F403",
# ambiguous name
"E741",
# line too long
"E501",
# key in dict.keys()
"SIM118",
# memory leaks
"B019",
# No such file or directory
"E902",
# nested `if` statements
"SIM102",
# `if`-`else`-block
"SIM108",
# assign `lambda` expressions
"E731",
# Loop control variable overrides iterable it iterates
"B020",
# Return te negated condition directly
"SIM103",
# Function definition does not bind loop variable
"B023",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]