pyproject.toml 4.07 KB
Newer Older
1
2
3
[project]
name = "tilelang"
description = "A tile level programming language to generate high performance code."
4
5
6
7
readme = "README.md"
requires-python = ">=3.8"
authors = [{name = "TileLang Contributors"}, {name = "Tile-AI"}]
maintainers = [{name = "Lei Wang", email = "leiwang1999@outlook.com"}]
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
license = "MIT"
keywords = ["BLAS", "CUDA", "HIP", "Code Generation", "TVM"]
classifiers = [
    "Environment :: GPU",
    "Operating System :: POSIX :: Linux",
    "Operating System :: OS Independent",
    "Operating System :: MacOS",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "Scientific/Engineering :: Artificial Intelligence",
]
dynamic = ["version"]
dependencies = [
    "cloudpickle",
27
28
    "ml-dtypes",
    "numpy>=1.23.5",
29
30
    "psutil",
    "torch",
31
32
33
    "torch>=2.7; platform_system == 'Darwin'",
    "tqdm>=4.62.3",
    "typing-extensions>=4.10.0",
34
35
36
37
38
]

[project.optional-dependencies]
# mldtypes should be greater than 0.5.1
# if you want to enable fp4
39
fp4 = ["ml-dtypes>=0.5.1"]
40

41
42
[build-system]
requires = [
43
    "cython>=3.0.0",
44
    "scikit-build-core",
45
    "setuptools>=63",
46
]
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
build-backend = "scikit_build_core.build"

[tool.scikit-build]
wheel.py-api = "cp38"
cmake.version = ">=3.26.1"
build-dir = "build"

# editable.rebuild = true

# Include backend and git info in version
metadata.version.provider = "version_provider"
metadata.version.provider-path = "."
experimental = true

[tool.scikit-build.wheel.packages]
tilelang = "tilelang"
"tilelang/src" = "src"
"tilelang/3rdparty" = "3rdparty"

# TODO: we might want to not include these in wheel?
"tilelang/benchmark" = "benchmark"
"tilelang/examples" = "examples"
"tilelang/testing" = "testing"
70
71
72
73
74
75
76

[tool.yapf]
based_on_style = "yapf"
column_limit = 100
indent_width = 4

[tool.codespell]
77
78
builtin = "clear,rare,en-GB_to_en-US"
ignore-words = "docs/spelling_wordlist.txt"
79
80
81
82
83
84
85
skip = [
    "build",
    "3rdparty",
    "dist",
    ".venv"
]

86
87
88
89
90
[tool.ruff]
target-version = "py38"
line-length = 100
output-format = "full"

91
92
93
[tool.ruff.lint]
select = [
    # pycodestyle
94
    "E", "W",
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    # 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",
115
116
    # if-else-block instead of ternary
    "SIM108",
117
118
119
120
    # key in dict.keys()
    "SIM118",
    # memory leaks
    "B019",
121
122
    # zip without explicit strict
    "B905",
123
124
125
    # No such file or directory
    "E902",
]
126
127
[tool.ruff.lint.per-file-ignores]
"3rdparty/**/*" = ["ALL"]
128
"examples/deepseek_v32/inference/**/*" = ["ALL"]
129

130
131
132
133
[tool.pytest.ini_options]
verbosity_assertions = 3
filterwarnings = ["always"]

134
135
136
137
138
[tool.cibuildwheel]
archs = ["auto64"]
# Pin to glibc 2.17 for x86 and 2.28 for aarch64 for now
manylinux-x86_64-image = "manylinux2014"
manylinux-aarch64-image = "manylinux_2_28"
139
skip = "*musllinux*"
140
environment-pass = ["CUDA_VERSION"]
141
142

[tool.cibuildwheel.linux]
143
repair-wheel-command = [
144
145
    "auditwheel repair --exclude libcuda.so.1 --exclude '/usr/local/cuda*' -w {dest_dir} {wheel}",
    "pipx run abi3audit --strict --report {wheel}",
146
]
147
environment.PATH = "/usr/local/cuda/bin:$PATH"
148
149
150
151
152
153
# Install CUDA runtime and stub driver library
# manylinux_2_28 uses gcc 14, which needs CUDA 12.8
before-all = """
set -eux

case "$(uname -m)" in
154
155
156
157
158
159
160
161
162
    "x86_64")
        yum-config-manager --add-repo https://developer.download.nvidia.cn/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
        ;;
    "aarch64")
        dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo
        ;;
    *)
        exit 1
        ;;
163
164
esac

165
166
167
cudaver="$(echo "${CUDA_VERSION:-"12.4"}" | cut -d '.' -f-2)"
v="${cudaver//./-}"
yum install -y "cuda-minimal-build-${v}" "cuda-driver-devel-${v}" "cuda-nvrtc-devel-${v}"
168
"""