Skip to content

Conversation

@ybgao-nvidia
Copy link

@ybgao-nvidia ybgao-nvidia commented Feb 10, 2026

This PR enables FP8 ViT attention using TransformerEngine with cuDNN backend.

It makes the following changes:

  1. Add TE_FP8 as a new AttentionBackendEnum and register it in the CUDA platform's supported ViT backends and Qwen3-VL's allowed backends
  2. Implement _forward_te_fp8 in MMEncoderAttention using TE's DotProductAttention with BSHD format, FP8 autocast via DelayedScaling, head-dimension padding (to multiples of 16), and seqlen bucketing to avoid cuDNN graph recompilation
  3. Process images one-at-a-time in gpu_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
  4. Add Transformer Engine build to the Docker image (cmake, cuda-toolkit-13-0, libcudnn9-dev, pybind11)

@github-actions
Copy link

👋 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 fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

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 ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant