onnxruntime
4942b12b - Fix Flash and Lean attention split heuristics (#29554)

Commit
13 days ago
Fix Flash and Lean attention split heuristics (#29554) ### Description Fixes split heuristic edge cases in Flash Attention and Lean Attention when the SM count is reported as zero or when there are no key tiles. The change clamps the SM count used by the heuristics, prevents divide-by-zero paths, and returns stable buffer sizing for empty tile cases. ### Changes - Guard Flash Attention split heuristic against zero SM count and degenerate split counts. - Guard Lean Attention split/buffer sizing against zero SM count, zero key tiles, and single-tile division cases. - Add CUDA provider regression tests for zero SM count and zero key-tile inputs. ### Testing - Added `attention_split_heuristic_test.cc` coverage for Flash Attention and Lean Attention split heuristics. Fixes #29550
Author
Parents
Loading