[Diffusion][CPU] Adding AMX optimizations for CPU platform - #28527
Merged
Conversation
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
jianan-gu
marked this pull request as ready for review
July 1, 2026 08:11
jianan-gu
requested review from
AgainstEntropy,
BBuf,
FlamingoPg,
HaiShaw,
ispobock,
merrymercy,
mickqian,
ping1jing2,
yhyang201,
yichiche,
yingluosanqian,
yizhang2077 and
yuan-luo
as code owners
July 1, 2026 08:11
Contributor
Author
|
/tag-and-rerun-ci |
mingfeima
requested changes
Jul 2, 2026
mingfeima
left a comment
Collaborator
There was a problem hiding this comment.
some minor changes are needed.
mingfeima
requested changes
Jul 2, 2026
mingfeima
approved these changes
Jul 7, 2026
Collaborator
|
@jianan-gu rebase to fix conflict. |
Contributor
Author
|
/rerun-failed-ci |
mickqian
reviewed
Jul 10, 2026
| # Avoid unintended computation graph accumulation during inference | ||
| if isinstance(p, torch.nn.Parameter): | ||
| p.requires_grad = False | ||
| local_torch_device = get_local_torch_device() |
Collaborator
There was a problem hiding this comment.
we have an existing quant_method.process_weights_after_loading call in L321-L330, please avoid duplicating it
Contributor
Author
There was a problem hiding this comment.
Thanks for pointing that, have submitted changes to avoid such duplicating #30717
Collaborator
|
this breaks CI, reverting in #30716 |
This was referenced Jul 14, 2026
Chronostasys
pushed a commit
to MindLab-Research/sglang
that referenced
this pull request
Aug 24, 2026
…ct#28527) Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
jakki-amd
pushed a commit
to jakki-amd/sglang
that referenced
this pull request
Sep 9, 2026
…ct#28527) Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
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.
This pr takes parts of follow-ups (mentioned in #20816) to bring key AMX based optimizations (scoping from LLM models) for CPU platforms, including:
With above take Wan-AI/Wan2.2-TI2V-5B-Diffusers model as an example, the main stages show:
Besides, we still find more chance to bring more speedup (but with small ratio), by adding fusions (compile or kernel based) like rmsnorm/layernorm and newGELUs, will make this in followup PRs.
CI States
Latest PR Test (Base): ❌ Run #28929873450
Latest PR Test (Extra): ❌ Run #28929873154