[Bugfix][CI][V1] Work around V1 + CUDA Graph + torch._scaled_mm fallback issue#13425
Conversation
Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com>
|
👋 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 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 🚀 |
mgoin
left a comment
There was a problem hiding this comment.
Certainly agree it is unfortunate, but this is critical to fix now. Nice work and LGTM
…ack issue (vllm-project#13425) Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com>
…ack issue (vllm-project#13425) Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com>
…ack issue (vllm-project#13425) Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
…ack issue (vllm-project#13425) Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com>
This PR works around an issue where vLLM V1, using Ada Lovelace GPUs, and when building vLLM with CUDA < 12.4, FP8 models with per-channel and/or per-tensor quantization will produce garbage output.
Closes #13212
AFAICT, there is some issue with the way we are setting up
TORCH_DEVICE_IDENTITYAlternatively, now that
torch._scaled_mmsupports rowwise scaling we could use that instead of the fallback. Unfortunately this only works if the model's dtype is bf16. Otherwise we get the error:Definitely am not happy about the approach here as is puts the onus on the caller of
apply_fp8_linearto also callmaybe_create_device_identitybefore the forward pass.