Skip to content

UV 11.0 flash-attn incompatibility #18690

@Samoed

Description

@Samoed

Summary

I have configured flash attention as described in https://docs.astral.sh/uv/concepts/projects/config/#augmenting-build-dependencies

[project]
name = "uvflash"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
    "torch>=2.11.0",
]

[project.optional-dependencies]
flash_attention = ["flash-attn>=2.6.3"]

[tool.uv.extra-build-dependencies]
flash-attn = [{ requirement = "torch", match-runtime = true }]

And when I try uv sync I get error

  × Failed to download and build `flash-attn==2.8.3`
  ╰─▶ Extra build requirement `torch` was declared with `match-runtime = true`, but `flash-attn` does not declare static metadata, making runtime-matching impossible
  help: `flash-attn` (v2.8.3) was included because `uvflash[flash-attention]` (v0.1.0) depends on `flash-attn>=2.6.3`

But on uv<0.11.0 this worked correctly

Platform

mac, ubuntu, any

Version

0.11.0

Python version

any

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions