Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ dmypy.json
# Pyre type checker
.pyre/

# Editor
*.sw?

# pytype static type analyzer
.pytype/

Expand Down
2 changes: 1 addition & 1 deletion csrc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set(CMAKE_CUDA_FLAGS "-Xcompiler -Wall -ldl")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -Wall -ldl")

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -O0")
Expand Down
106 changes: 106 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
[build-system]
# Minimum requirements
requires = [
"torch>=2.8.0",
# Rely on torch versioning for setuptools
"setuptools",
"wheel",
"setuptools-cuda",
]

build-backend = "setuptools.build_meta"

[project]
name = "NATTEN"
version = "0.21.1"
description = "Neighborhood Attention Extension"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.9"
authors = [
{name = "Ali Hassani", email="[email protected]" },
]
maintainers = [
{name = "Ali Hassani", email="[email protected]"},
]
keywords = [
"sparse attention",
"deep learning",
"machine learning",
"ml",
"artificial intelligence",
"ai",
]

dependencies = [
"torch>=2.8.0",
]

# Classifiers for better searching pypi
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: GPU",
"Environment :: GPU :: NVIDIA CUDA",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
#"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
]

[project.urls]
Homepage = "https://natten.org"
Repository = "https://github.com/SHI-Labs/NATTEN.git"
Issues = "https://github.com/SHI-Labs/NATTEN/issues"
Changelog = "https://github.com/SHI-Labs/NATTEN/blob/master/CHANGELOG.md"
Documentation = "https://natten.org/"
Download = "https://whl.natten.org/"

[dependency-groups]
# ruff should replace flake8...
dev = [
"flake8>=7.0.0",
"markdown-grid-tables>=0.5.0",
"mkdocs>=1.6.1",
"mkdocs-glightbox>=0.4.0",
"mkdocs-material>=9.6.14",
"mkdocstrings-python>=1.16.11",
"mypy>=1.8.0",
"packaging>=25.0",
"pygments>=2.19.1",
"pymdown-extensions>=10.15",
"rich>=14.0.0",
"ruff>=0.11.12",
"tqdm>=4.67.1",
"twine>=6.1.0",
"ufmt>=2.3.0",
"numpy>=2.0.2",
"pytest>=8.4.1",
]

[tool.ruff]
exclude = [
".venv",
".*",
]
# Set max line to 85, giving a little buffer
line-length = 85

[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules
select = [
# flake8 bugbear (B), bandit (S), builtins (A), debugger (T10)
"B", "A", "T10",
# isort
"I",
# Warnings
"W",
]

[tool.uv.build-backend]
module-name = "natten"
31 changes: 0 additions & 31 deletions requirements-dev.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

14 changes: 0 additions & 14 deletions setup.cfg

This file was deleted.

Loading