[build-system] requires = ["setuptools>=75", "setuptools-scm>=8", "wheel"] build-backend = "setuptools.build_meta" [project] name = "flash-sparse-attn" dynamic = ["version"] description = "Flash Sparse Attention: Fast and Memory-Efficient Trainable Sparse Attention" readme = "README.md" requires-python = ">=3.10" license = { file = "LICENSE" } authors = [ { name = "Jingze Shi", email = "losercheems@gmail.com" }, ] classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: BSD License", "Operating System :: Unix" ] dependencies = [ "triton>=3.6.0", ] [project.urls] Homepage = "https://github.com/HKUSTDial/flash-sparse-attention" Source = "https://github.com/HKUSTDial/flash-sparse-attention" Issues = "https://github.com/HKUSTDial/flash-sparse-attention/issues" [project.optional-dependencies] cute = [ "nvidia-cutlass-dsl>=4.6.2", "einops", "typing_extensions", "apache-tvm-ffi>=0.1.12,<0.2", "torch-c-dlpack-ext", "quack-kernels>=0.6.1" ] dev = [ "transformers>=4.38.0", "pytest>=6.0", "pytest-benchmark", "numpy", "tabulate>=0.9.0" ] docs = [ "mkdocs>=1.6", "mkdocs-material>=9.5", "mkdocstrings[python]>=0.28", "pymdown-extensions>=10.0" ] [tool.setuptools.dynamic] version = { attr = "flash_sparse_attn.__version__" } [tool.setuptools.packages.find] where = ["."] include = ["flash_sparse_attn*"] exclude = [ "docs", ] [tool.setuptools.package-data] flash_sparse_attn = ["*.py"] [tool.setuptools] [[tool.uv.index]] name = "pytorch-cu130" url = "https://download.pytorch.org/whl/cu130" explicit = true [tool.uv.sources] torch = [ { index = "pytorch-cu130", marker = "extra == 'cu13'" }, ] [tool.ruff.lint] select = ["E4", "E7", "E9", "F"] ignore = [ "E731", # do not assign a lambda expression, use a def "E741", # Do not use variables named 'I', 'O', or 'l' "F841", # local variable is assigned to but never used "D102", # Missing docstring in public methods ]