Skip to content

[Bugfix][ROCm] Fix MiniMax-M3 fused MXFP8 block scale - #53674

Merged
AndreasKaratzas merged 6 commits into
vllm-project:mainfrom
maithilijoshi20:fix/issue-53668-swiglu-mxfp8
Sep 16, 2026
Merged

AndreasKaratzas merged 6 commits into
vllm-project:mainfrom
maithilijoshi20:fix/issue-53668-swiglu-mxfp8

Conversation

@maithilijoshi20

@maithilijoshi20 maithilijoshi20 commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Fixes #53668.

The MiniMax-M3 ROCm fused SwiGLU + MXFP8 activation quantizer now derives its E8M0 block scale with the same E4M3 finite range and float32 tiny-value floor as the shared MXFP8 reference. This fixes mixed-magnitude blocks that otherwise underflow small activation values, and preserves the reference scale for empty blocks.

Duplicate-work check

Searched open issues and PRs for swiglu_oai_quantize_mxfp8, _swiglu_oai_quant_kernel, swiglu MXFP8, and the block-scale formula. No open change addresses this fused MiniMax-M3 implementation. #53110 fixed the separate generic ROCm quantizer; this PR applies the same established behavior to the omitted fused kernel.

Test plan and results

  • uv run ruff check vllm/models/minimax_m3/amd/ops/swiglu_oai.py tests/kernels/test_minimax_m3_amd_ops.py: passed.
  • uv run python -m compileall -q vllm/models/minimax_m3/amd/ops/swiglu_oai.py tests/kernels/test_minimax_m3_amd_ops.py: passed.

The PR remains a draft pending ROCm validation.

AI assistance

AI assistance was used to add the regression test, and draft this description. The submitter reviewed every changed line and the reported validation results.

Signed-off-by: maithilijoshi20 <97733343+maithilijoshi20@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

👋 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.

PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment /ci run for upstream CI or /amd-ci run for AMD CI only whenever CI signals are needed.

Once the PR is approved or has the ready label, the PR author can also use the corresponding /ci run, /ci retry, and /ci cancel commands, or their /amd-ci variants. New commits do not start upstream CI automatically.

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

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

@mergify mergify Bot added the minimax label Aug 25, 2026
Use the shared MXFP8 finite range and tiny-value floor in the fused SwiGLU quantizer, including an empty-block regression test.

Signed-off-by: maithilijoshi20 <97733343+maithilijoshi20@users.noreply.github.com>
@maithilijoshi20 maithilijoshi20 changed the title Fix MiniMax M3 fused MXFP8 scale [Bugfix][ROCm] Fix MiniMax-M3 fused MXFP8 block scale Aug 25, 2026
@mergify mergify Bot added rocm Related to AMD ROCm bug Something isn't working labels Aug 25, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Aug 25, 2026

@AndreasKaratzas AndreasKaratzas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

One small note @maithilijoshi20 -- the PR description is heavily AI generated and although you've declared it at the end, I would personally appreciate it if the PR description was friendlier to the reviewers (making it easier to review). For example, talking about how ruff checks are passing just wastes everybody's time.

For formal approval, open the PR and I ll run the CI tests too first.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@maithilijoshi20

maithilijoshi20 commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @AndreasKaratzas , I am sorry for the AI generated description. I will keep it in mind from the next time. Opened the PR. Also, pre-commit would fail for me as I have less than 4 VLLM PRs.

@AndreasKaratzas AndreasKaratzas added the verified Run pre-commit for new contributors without triggering other tests label Aug 31, 2026
@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #86303 for commit 87f69ec0d403.

@mergify

mergify Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Hi @maithilijoshi20, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Signed-off-by: maithilijoshi20 <97733343+maithilijoshi20@users.noreply.github.com>
@mergify

mergify Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Hi @maithilijoshi20, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Signed-off-by: maithilijoshi20 <97733343+maithilijoshi20@users.noreply.github.com>
@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #86316 for commit edfc04df10a9.

@AndreasKaratzas

Copy link
Copy Markdown
Member

One more question, how to repro the bug? Cause this is not linked to any open issue.

@maithilijoshi20

Copy link
Copy Markdown
Contributor Author

@AndreasKaratzas it is linked to #53668 . The bug happens on ROCm with MiniMax-M3 when the fused SwiGLU MXFP8 path processes an all-zero 32-value block.

@AndreasKaratzas
AndreasKaratzas merged commit 22bb158 into vllm-project:main Sep 16, 2026
61 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD Sep 16, 2026
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
…3674)

Signed-off-by: maithilijoshi20 <97733343+maithilijoshi20@users.noreply.github.com>
@maithilijoshi20
maithilijoshi20 deleted the fix/issue-53668-swiglu-mxfp8 branch November 13, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working minimax rocm Related to AMD ROCm verified Run pre-commit for new contributors without triggering other tests

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: MiniMax-M3 fused SwiGLU MXFP8 kernel still uses the pre-#53110 block scale formula

2 participants