[diffusion] model: Properly validate device for Mistral 3 attention#22690
Merged
HaiShaw merged 3 commits intosgl-project:mainfrom Apr 16, 2026
Merged
[diffusion] model: Properly validate device for Mistral 3 attention#22690HaiShaw merged 3 commits intosgl-project:mainfrom
HaiShaw merged 3 commits intosgl-project:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Mistral 3 encoder to utilize current_platform.is_cuda() for hardware detection. A review comment points out that removing the explicit tensor device type check could incorrectly trigger the CUDA backend for CPU-resident tensors, suggesting a combined check instead.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
mickqian
approved these changes
Apr 13, 2026
Collaborator
|
/tag-and-rerun-ci |
Collaborator
|
/rerun-failed-ci |
Collaborator
|
@mickqian All CI (Nvidia + AMD) passed and PR is approved, ready for merge — SGLDHelper bot |
5 tasks
jmamou
pushed a commit
to jmamou/sglang
that referenced
this pull request
Apr 20, 2026
yhyang201
pushed a commit
to yhyang201/sglang
that referenced
this pull request
Apr 22, 2026
zhangying098
pushed a commit
to zhangying098/sglang
that referenced
this pull request
Apr 23, 2026
kyx1999
pushed a commit
to KMSorSMS/sglang
that referenced
this pull request
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
PR #22423 changed it so that Mistral 3 (Used in Flux2) uses cuDNN attention by default, if the device type is
cuda. AMD HW however also reports the device type ascuda, but does not support cuDNN attention. This change broke AMD support for Flux2.Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ci