-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathpyproject.toml
More file actions
87 lines (77 loc) · 3.14 KB
/
Copy pathpyproject.toml
File metadata and controls
87 lines (77 loc) · 3.14 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "quack-kernels"
dynamic = ["version"]
requires-python = ">=3.10"
dependencies = [
"nvidia-cutlass-dsl==4.6.1",
"torch",
"apache-tvm-ffi>=0.1.6,<0.2",
"torch-c-dlpack-ext",
"einops",
]
[project.optional-dependencies]
cu13 = ["nvidia-cutlass-dsl[cu13]==4.6.1"]
heuristics = ["nvidia-matmul-heuristics"]
jax = ["jax", "jax-tvm-ffi"]
bench = ["pandas", "tyro"]
dev = [
"pre-commit",
"pytest",
"pytest-xdist",
"ruff",
]
[tool.setuptools.packages.find]
where = ["."]
include = ["quack*"]
[tool.setuptools.dynamic]
version = {attr = "quack.__version__"}
[[tool.uv.index]]
name = "pytorch-cu130"
url = "https://download.pytorch.org/whl/cu130"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-cu130", marker = "extra == 'cu13'" },
]
[tool.pytest.ini_options]
# Disable pytest plugins we don't need. These add per-test hook dispatch and
# session-end work that costs ~1-2s on a 2k-test file with no functional
# benefit for quack's CI workflow:
# - cacheprovider: .pytest_cache/ lastfailed bookkeeping (writes to disk per session)
# - unraisableexception: 3x gc.collect() at session end to flush sys.unraisablehook (0.6s)
# - threadexception: same idea for threading.excepthook (~tens of ms)
# Disabling these is safe: pytest reports test failures the same way; we just
# lose the rarely-useful "there was an unraisable exception during test X"
# secondary report. Tests still fail normally on real errors.
addopts = "-p no:cacheprovider -p no:unraisableexception -p no:threadexception"
# Filters set via warnings.filterwarnings() in conftest.py don't survive pytest's
# per-test catch_warnings context — pytest prepends its own ('always', Warning)
# filter, which then matches before any conftest 'ignore'. Filters declared here
# are installed by pytest *after* its 'always', so they actually win.
#
# torch.compile / Inductor scripts dynamically-created methods via the
# deprecated torch.jit.script_method during tracing, firing 300+ deprecation
# warnings per --compile-only run. Suppress at the source module.
filterwarnings = [
"ignore:`torch\\.jit\\.script_method`.*Please switch to `torch\\.compile` or `torch\\.export`\\.:DeprecationWarning:torch\\.jit\\._script",
# torch.profiler.profile() unconditionally warns when acc_events=False (the
# default) about events being cleared at each cycle. Our tests profile a
# single kernel launch in one cycle, so the warning is irrelevant. Silence
# at source rather than threading acc_events=True through every call site.
# NOTE: filterwarnings uses ':' as field separator, so the message regex
# cannot contain literal colons — match a colon-free substring instead.
"ignore:.*Profiler clears events at the end of each cycle.*:UserWarning:torch\\.profiler\\.profiler",
]
[tool.ruff]
line-length = 100
exclude = [".#*"]
[tool.ruff.lint]
extend-select = ["B904"]
ignore = [
"E731", # do not assign a lambda expression, use a def
"E741", # Do not use variables named 'I', 'O', or 'l'
"F841", # local variable is assigned to but never used
]