[Bugfix] Fix FlashInfer non-causal draft attention (DFlash/DSpark) on Blackwell (#48167)

Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Michael Goin
2026-07-15 12:44:01 -07:00
committed by GitHub
co-authored by Claude Fable 5
parent 49e777cf08
commit ecf4aa5ce2
12 changed files with 149 additions and 47 deletions
@@ -1480,7 +1480,9 @@ def _get_backends_from_return(stmts: list) -> list[str]:
def _is_sm100_check(test: ast.expr) -> bool:
"""Check if test is `something.major == 10`."""
"""Check if test is `something.major == 10`, possibly inside an `and`."""
if isinstance(test, ast.BoolOp) and isinstance(test.op, ast.And):
return any(_is_sm100_check(value) for value in test.values)
return (
isinstance(test, ast.Compare)
and isinstance(test.left, ast.Attribute)