-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (113 loc) · 3.22 KB
/
pyproject.toml
File metadata and controls
126 lines (113 loc) · 3.22 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
[project]
name = "lighthouse"
dynamic = ["version"]
requires-python = ">=3.10,<3.13" # Bounds are due to torch-mlir's packaging
dependencies = [
"mlir-python-bindings==20260305+c32caeec8"
]
[dependency-groups]
dev = [
"lit==18.1.8", # Tool to configure, discover and run tests
"ruff==0.14.5", # Python linter and formatter
"pre-commit", # Tool to manage and apply pre-commit hooks
"pytest>=8.0.0",
"psutil",
]
[project.optional-dependencies]
ingress_torch_mlir = [
"torch-mlir==20260125.703",
"ml_dtypes",
]
# Additional "targets" which pull in optional dependencies -- use `uv sync --extra TARGET`
ingress_torch_cpu = [
"torch==v2.9.1+cpu",
"lighthouse[ingress_torch_mlir]"
]
ingress_torch_nvidia = [
"torch==2.9.1", # Nvidia-enabled version of torch
"lighthouse[ingress_torch_mlir]"
]
ingress_torch_rocm = [
"torch==2.9.1+rocm6.4", # AMD-enabled version of torch
"pytorch_triton_rocm", # Transitive dependency listed explicitly so that we can state which package repository it is supposed to come from
"lighthouse[ingress_torch_mlir]"
]
ingress_torch_xpu = [
"torch==2.9.1+xpu", # Intel-enabled version of torch
"pytorch_triton_xpu", # Transitive dependency listed explicitly so that we can state which package repository it is supposed to come from
"lighthouse[ingress_torch_mlir]"
]
runtime_mpich = [
"mpi4py",
"mpich"
]
runtime_impi = [
"mpi4py",
"impi-rt"
]
[tool.uv]
# Declare that the following "targets" are mutually exclusive of one another
conflicts = [
[
{extra = "ingress_torch_cpu" },
{extra = "ingress_torch_nvidia" },
{extra = "ingress_torch_rocm" },
{extra = "ingress_torch_xpu" }
]
]
[tool.uv.sources]
# Bind packages to particular package repositories
mlir_python_bindings = { index = "eudsl" }
torch = { index = "pytorch" }
pytorch_triton_xpu = { index = "pytorch" }
pytorch_triton_rocm = { index = "pytorch" }
torch_mlir = { index = "torch_mlir" }
# The following are the different non-Pypi package repositories we depend on
[[tool.uv.index]]
name = "eudsl"
url = "https://llvm.github.io/eudsl"
explicit = true
format = "flat"
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl"
explicit = true
[[tool.uv.index]]
name = "torch_mlir"
url = "https://github.com/llvm/torch-mlir-release/releases/expanded_assets/dev-wheels"
explicit = true
# Derive package version from version in code
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["lighthouse*"]
[tool.setuptools.dynamic]
version = {attr = "lighthouse.__version__"}
[tool.ruff]
src = ["lighthouse"]
target-version = "py310"
line-length = 88
[tool.ruff.format]
docstring-code-format = true
quote-style = "double"
# List of rules:
# https://docs.astral.sh/ruff/rules/
[tool.ruff.lint]
select = [
"D419", # empty-docstring
"E", # Error
"F", # Pyflakes
"PERF", # Perflint
"RUF022", # __all__ is not sorted
"RUF030", # print() call in assert
"RUF034", # useless if-else
"RUF047", # empty else
"RUF200", # invalid pyproject.toml
"W", # Warning
]
ignore = [
"E501", # line-too-long
"PERF203", # try-except-in-loop
"PERF401", # manual-list-comprehension
]