Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/test_helpers/jit_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ def gen_prefill_attention_modules(
dtype_q=q_dtype,
dtype_kv=kv_dtype,
):
if q_dtype != kv_dtype:
continue # fa3 template do not support mixed precision
Comment on lines +163 to +164
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This correctly prevents generating an invalid configuration for the fa3 backend in this test helper. However, this only addresses the symptom in the JIT warmup. The root cause appears to be in flashinfer.utils.determine_attention_backend, which can still select the fa3 backend for mixed-precision cases because is_fa3_backend_supported doesn't perform this check. This could lead to runtime errors in user-facing APIs like single_prefill_with_kv_cache. A more robust fix would be to add the mixed-precision check to is_fa3_backend_supported to prevent incorrect backend selection throughout the library.


jit_specs.append(
flashinfer.prefill.gen_single_prefill_module(
"fa3",
Expand Down