[build-system] requires = ["setuptools>=75", "setuptools-scm>=8"] build-backend = "setuptools.build_meta" [project] name = "flash-attn-4" dynamic = ["version"] description = "Flash Attention CUTE (CUDA Template Engine) implementation" readme = "README.md" requires-python = ">=3.10" license = {text = "BSD 3-Clause License"} authors = [ {name = "Tri Dao"}, ] classifiers = [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] dependencies = [ "nvidia-cutlass-dsl>=4.6.2", "torch", "einops", "typing_extensions", "apache-tvm-ffi>=0.1.11,<0.2", "torch-c-dlpack-ext", "quack-kernels>=0.5.3", ] [project.optional-dependencies] cu13 = ["nvidia-cutlass-dsl[cu13]>=4.6.2"] dev = [ "pytest", "pytest-xdist", "ruff", ] [project.urls] Homepage = "https://github.com/Dao-AILab/flash-attention" Repository = "https://github.com/Dao-AILab/flash-attention" [tool.setuptools] packages = ["flash_attn.cute"] package-dir = {"flash_attn.cute" = "."} [tool.setuptools_scm] root = "../.." tag_regex = "^fa4-v(?P.+)$" git_describe_command = "git describe --dirty --tags --long --match 'fa4-v*'" fallback_version = "0.0.0" [[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] line-length = 100 [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 ]