Files
project_6/qwen3_6_scripts
project6-dev ad6863ed84 perf: replace Python Q-tiling fallback with ixformer.flash_attn_varlen_func
Verified on real BI-V100:
  flash_attn_func works with head_dim=256 (diff < 0.004, no NaN)
  flash_attn_varlen_func works for variable-length batching
  seq=1024: 1.7x faster than PyTorch matmul

The profiling-stage _run_sdpa_fallback now tries flash_attn_varlen_func
first, falls back to Python Q-tiling only on exception.

This addresses the 10-50x attention slowdown identified in the analysis:
  Python Q-tiling: O(L^2) per-tile matmul in Python loop
  flash_attn: fused kernel, O(L) memory, hardware-optimized
2026-08-13 05:14:08 +00:00
..