From 8751c0666457e72ef5d92c7113c131a7c11ef595 Mon Sep 17 00:00:00 2001 From: Anai-Guo Date: Thu, 3 Sep 2026 21:11:53 -0700 Subject: [PATCH] Drop the unsupported window_size argument from attention backend queries get_available_attention_backends() in tests/pytorch/utils.py has no window_size parameter and no **kwargs, so both call sites that pass window_size=config.window_size raise TypeError before any backend is queried. The helper already reads config.window_size internally when it builds the DotProductAttention kwargs, so the argument is redundant as well as invalid; every other call site omits it. Signed-off-by: Anai-Guo --- benchmarks/attention/benchmark_attention.py | 1 - docs/examples/attention/example_attention.py | 1 - 2 files changed, 2 deletions(-) diff --git a/benchmarks/attention/benchmark_attention.py b/benchmarks/attention/benchmark_attention.py index c45f3cabaf..27feaccc00 100644 --- a/benchmarks/attention/benchmark_attention.py +++ b/benchmarks/attention/benchmark_attention.py @@ -195,7 +195,6 @@ def main(): config, qkv_dtype=dtype, qkv_layout=qkv_layout, - window_size=config.window_size, pad_between_seqs=pad_between_seqs, ) flash_attn_supported, fused_attn_supported, unfused_attn_supported = available_backends diff --git a/docs/examples/attention/example_attention.py b/docs/examples/attention/example_attention.py index 92a68795cc..d580361ed1 100644 --- a/docs/examples/attention/example_attention.py +++ b/docs/examples/attention/example_attention.py @@ -90,7 +90,6 @@ def main(): config, qkv_dtype=dtype, qkv_layout=qkv_layout, - window_size=config.window_size, pad_between_seqs=pad_between_seqs, ) flash_attn_supported, fused_attn_supported, unfused_attn_supported = available_backends