Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (74 loc) · 2.35 KB
/
Copy pathpyproject.toml
File metadata and controls
89 lines (74 loc) · 2.35 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
[project]
name = "torch-neuronx"
dynamic = ["version", "dependencies"]
description = "Neuron Backend for PyTorch"
license = "Apache-2.0"
authors = [{name = "AWS Neuron Team"}]
requires-python = ">=3.10,<3.15"
[project.scripts]
neuron-numa-launch = "torch_neuronx.numa:numa_launch_main"
[project.entry-points."torch.backends"]
torch_neuronx = "torch_neuronx:_autoload"
[project.entry-points."torch_dynamo_backends"]
neuron = "torch_neuronx.neuron_dynamo_backend.backend:neuron_backend"
[build-system]
# Use this PyTorch version for uv and isolated builds.
requires = ["setuptools>=77.0.3", "wheel", "torch==2.14.0", "grpcio-tools"]
build-backend = "setuptools.build_meta"
[project.optional-dependencies]
dev = [
"setuptools>=77.0.3",
"expecttest>=0.3.0",
"hypothesis",
"ninja>=1.11.1.4",
# pytest-forked 1.7.5 cannot marshal the TestReport._id that pytest 9.2 adds.
# Lift the pin when a pytest-forked release supports pytest 9.2.
"pytest<9.2",
"pytest-xdist",
"pytest-html",
"pytest-cov",
"pytest-json-report",
"pytest-timeout",
"pytest-shard",
"ruff>=0.8.0",
"pyzstd",
"pytest-forked",
"PyYAML",
"multiprocess",
"pyarrow",
]
docs = [
"sphinx>=8.0",
"sphinx-book-theme",
]
[tool.uv.sources]
torch = { index = "pytorch" }
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-nightly"
url = "https://download.pytorch.org/whl/nightly/cpu"
explicit = true
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = ["build", "dist", ".eggs"]
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP", "B", "C4", "SIM", "RUF"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "E402"]
"tests/*" = ["S101", "F401"] # Allow assert and unused imports in tests (torch_neuronx needs to be imported for side effects)
"examples/**/*" = ["F401"] # Allow unused imports in examples for side effects
"**/dynamic_kernels/*_kernel.py" = ["B023"] # nl.fori_loop bodies close over loop vars; traced immediately, so no late-binding hazard
[tool.pytest.ini_options]
addopts = "--dist=loadgroup"
[tool.mypy]
python_version = "3.14"
files = ["torch_neuronx"]
ignore_missing_imports = true
no_error_summary = true
# Files with large numbers of existing errors; remove as they are cleaned up.
[[tool.mypy.overrides]]
ignore_errors = true