Add TransformerEngine FP8 for image encoder#45
Add TransformerEngine FP8 for image encoder#45ybgao-nvidia wants to merge 7 commits intoreduce-vit-kernel-gapsfrom
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
This PR enables FP8 ViT attention using TransformerEngine with cuDNN backend.
It makes the following changes:
TE_FP8as a newAttentionBackendEnumand register it in the CUDA platform's supported ViT backends and Qwen3-VL's allowed backends_forward_te_fp8in MMEncoderAttention using TE'sDotProductAttentionwith BSHD format, FP8 autocast viaDelayedScaling, head-dimension padding (to multiples of 16), and seqlen bucketing to avoid cuDNN graph recompilationgpu_model_runner.py(_execute_encoder_one_by_one_eager) because TE does not support THD format for FP8 — we reinterpret each single-sequence THD tensor as BSHD with B=1, S=T to avoid expensive layout conversion