[build-system]
requires = ["scikit-build-core>=0.8.0"]
build-backend = "scikit_build_core.build"
[project]
name = "torch-catlass"
dynamic = ["version"]
description = "Catlass-based PyTorch NPU operators with multi-architecture support"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"attrs",
"cython",
"numpy>=2.4.4",
"decorator",
"sympy",
"cffi",
"pyyaml>=6.0.3",
"pathlib2",
"psutil",
"protobuf==3.20.0",
"scipy",
"requests",
"absl-py",
"torch>=2.0.0",
"torch-npu",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"ruff>=0.11.0",
]
[tool.scikit-build]
cmake.version = ">=3.16"
cmake.args = [
"-DCMAKE_BUILD_TYPE=Release",
]
ninja.make-fallback = true
wheel.packages = ["torch_catlass"]
wheel.install-dir = "torch_catlass"
editable.rebuild = false
editable.verbose = false
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "torch_catlass/_version.py"
[tool.scikit-build.cmake.define]
CATLASS_ARCH_LIST = {env = "CATLASS_ARCH_LIST", default = "2201;3510"}
[tool.uv]
no-build-isolation-package = ["torch-catlass"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
[tool.ruff.lint]
select = [
"E",
"W",
"F",
"I",
"N",
"UP",
"B",
"SIM",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "E402", "F403", "F405"]
"tests/*" = ["N"]
"torch_catlass/ops/basic_matmul.py" = ["N803", "N806"]