-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (79 loc) · 2.83 KB
/
Copy pathpyproject.toml
File metadata and controls
89 lines (79 loc) · 2.83 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
[build-system]
requires = ["setuptools>=68.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "trntensor"
version = "0.4.0"
description = "Tensor contractions for AWS Trainium via NKI"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
{ name = "Scott Friedman", email = "scttfrdmn@gmail.com" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
]
dependencies = [
"torch>=2.1",
"numpy>=1.24",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-benchmark>=4.0",
"pytest-cov>=4.0",
"ruff>=0.6",
"pre-commit>=3.7",
"scipy>=1.11",
"mkdocs>=1.5",
"mkdocs-material>=9.0",
]
[project.urls]
Homepage = "https://github.com/trnsci/trntensor"
Documentation = "https://trnsci.dev/trntensor/"
Repository = "https://github.com/trnsci/trntensor"
Issues = "https://github.com/trnsci/trntensor/issues"
[tool.setuptools.packages.find]
include = ["trntensor*"]
# Neuron SDK note: on-hardware runs use the AWS Deep Learning AMI's
# pre-built venv at /opt/aws_neuronx_venv_pytorch_*, which bundles
# neuronxcc and the NKI runtime. There is no pip-install step for Neuron —
# the DLAMI's terraform `most_recent = true` pulls the current image and
# its venv tracks the current SDK (2.29 as of 2026-04-09, with NKI 0.3.0
# Stable and the CPU simulator). trntensor does not declare neuronxcc in
# its dep set; CPU-only installs resolve cleanly from PyPI.
[tool.ruff]
# Match the rest of the trnsci suite. Line length 100 is a compromise
# between black's 88 and the wider tables common in scientific code.
line-length = 100
target-version = "py310"
extend-exclude = ["site", "infra/terraform*/.terraform"]
[tool.ruff.lint]
# Sensible default selection: pycodestyle (E/W), Pyflakes (F), isort (I),
# pyupgrade (UP), flake8-bugbear (B), flake8-simplify (SIM). Skip docstring
# rules (D*) — we're deliberately light on docstrings in this project.
select = ["E", "W", "F", "I", "UP", "B", "SIM"]
ignore = [
"E501", # line too long — formatter handles it
"B008", # function call in default arg — common + intentional here
]
[tool.ruff.lint.per-file-ignores]
# NKI kernels use patterns that trip some lint rules (SBUF writes that
# look unused to the linter, etc). Don't fight the kernel authoring loop.
"trntensor/nki/_kernels.py" = ["F841", "B007"]
"trntensor/nki/dispatch.py" = ["F841", "B007"]
"scripts/*" = ["F401"]
"tests/*" = ["F401", "F811"]
[tool.ruff.format]
# Black-compatible defaults.
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
markers = ["neuron: requires Neuron hardware"]
testpaths = ["tests"]
python_files = ["test_*.py", "bench_*.py"]