Skip to content

[XPU][Diffusion] Enable MiniMax H3 on XPU platforms - #33366

Merged
mingfeima merged 15 commits into
sgl-project:mainfrom
jianan-gu:h3_xpu_support
Sep 9, 2026
Merged

mingfeima merged 15 commits into
sgl-project:mainfrom
jianan-gu:h3_xpu_support

Conversation

@jianan-gu

@jianan-gu jianan-gu commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This PR adds key changes to cover the enabling for Minimax H3 model specific on XPU platforms, including

  • Mapping to XPU attention backend with optimized kernel from sgl-kernel-xpu
  • Necessary device dispatching/autocast codes
  • Runtime XPU memory D2H/H2D fix

Tested serving pipelines include:

Next plans (as follow-up PRs, for further optimizations).

  • Apply more fusions (like QKnorm_RoPE and silu_and_mul, to be on par with cuda fusion pathes)
  • More serving pipelines/parallelism to be explored and evaluated.
  • XPU FA backend with non-contiguous support

Tested example:

Result:

cookbook.mp4

CI States

Latest PR Test (Base): ✅ Run #34183716549
Latest PR Test (Extra): ✅ Run #34183716399
Latest PR Test (AMD ROCm 7.2): ❌ Run #34183716525

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added the diffusion SGLang Diffusion label Aug 3, 2026
@jianan-gu
jianan-gu marked this pull request as ready for review August 3, 2026 14:18
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@jianan-gu

Copy link
Copy Markdown
Contributor Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci label Aug 3, 2026
Comment thread python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py Outdated
This reverts commit 692aa4b.
@jianan-gu

Copy link
Copy Markdown
Contributor Author

/tag-run-ci-label extra

@jianan-gu
jianan-gu requested a review from mickqian August 4, 2026 03:32
@jianan-gu

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

1 similar comment
@jianan-gu

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

@jianan-gu

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

@jianan-gu

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

1 similar comment
@jianan-gu

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

@jianan-gu

Copy link
Copy Markdown
Contributor Author

Hi @mickqian could you help revisit and take a look on this PR? Thanks.
The PR changes much simpler now as we have rebased with main that like NPUs are doing similar refactoring for H3.
The CI is passed for CUDA, and the AMD CI test failures are not related to this PR, also happens on main: https://github.com/sgl-project/sglang/actions/runs/33456144533

@jianan-gu

Copy link
Copy Markdown
Contributor Author

Hi @mingfeima, after rebase from main, this PR is XPU specific now, all previous common components changes now we are leveraging the common path from main, by just adding is_xpu. And the main CI (CUDA) is passed, with some failures (AMD suite) also happen on main. Shall we proceed? Thanks

@mingfeima

Copy link
Copy Markdown
Collaborator

@jianan-gu rebase and fix the conflict.

@jianan-gu

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

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

Labels

diffusion SGLang Diffusion intel run-ci run-ci-extra xpu intel gpu with device `torch.xpu`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants