[https://nvbugs/6422318][fix] Cast cos_sin_cache to float32 at cat-time to satisfy flashinfer's contract…#16069
Conversation
…ly_rope Flashinfer's apply_rope_with_cos_sin_cache_inplace strictly requires float32 cos_sin_cache, but the upstream _get_window_rope_pos_embeddings pre-casts cos/sin to the vision-tower dtype (bf16 under auto_dtype) as a perf hint for the PyTorch RoPE fallback. Qwen2.5-VL vision head_dim=80 skips the flashinfer branch, but EXAONE-4.5 reuses the tower with a head_dim that is a multiple of 64 and hits the strict dtype check. Cast cos_sin_cache to float32 at cat-time so the flashinfer contract is met without disturbing the upstream perf cast. Also broaden the exception clause from RuntimeError to (RuntimeError, ValueError) so any future flashinfer contract change falls back to the PyTorch path instead of failing the run. Remove the corresponding B300/GB200/GB300/H20 waivers in waives.txt. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR updates the FlashInfer RoPE fast-path in Qwen2.5-VL vision attention to cast the concatenated cos_sin_cache to float32 and broadens exception handling to catch both RuntimeError and ValueError for fallback. It also removes four pairs of test waiver entries for TestExaone4_5_33B::test_auto_dtype across multiple hardware configurations. ChangesQwen2.5-VL RoPE Fix
Test Waiver Cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run --disable-fail-fast |
|
PR_Github #58004 [ run ] triggered by Bot. Commit: |
|
PR_Github #58004 [ run ] completed with state
|
Summary
Test plan
Links
Summary by CodeRabbit