Skip to content

add swiglu oai quant ops - #575

Open
heziiop wants to merge 2 commits into
sgl-project:mainfrom
heziiop:swiglu-oai-quant
Open

add swiglu oai quant ops#575
heziiop wants to merge 2 commits into
sgl-project:mainfrom
heziiop:swiglu-oai-quant

Conversation

@heziiop

@heziiop heziiop commented Jun 27, 2026

Copy link
Copy Markdown
Contributor
  1. support swiglu_oai_quant operator adapted from swiglu_quant
  2. fix bug in swiglu_quant op

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new implementation of the swiglu_oai activation function with optional per-row int8 quantization for Ascend NPU, supporting both dense MLP and MoE grouped modes. The review feedback correctly identifies a critical bug where the undefined kernel _swiglu_oai_quant_kernel_grouped is called instead of _swiglu_oai_quant_kernel_moe.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

f"got {group_list.dtype}"
)

_swiglu_oai_quant_kernel_grouped[(num_vectorcore,)](

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

The kernel _swiglu_oai_quant_kernel_grouped is not defined or imported in this file. It should be _swiglu_oai_quant_kernel_moe.

Suggested change
_swiglu_oai_quant_kernel_grouped[(num_vectorcore,)](
_swiglu_oai_quant_kernel_moe[(num_vectorcore,)](

@heziiop
heziiop force-pushed the swiglu-oai-quant branch from 5ef051f to bbad098 Compare June 30, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant