Skip to content

Enable the super kernel feature under the Multistream Moe feature #1641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v0.9.1-dev
Choose a base branch
from

Conversation

NNUCJ
Copy link

@NNUCJ NNUCJ commented Jul 7, 2025

What this PR does / why we need it?

Does this PR introduce any user-facing change?

How was this patch tested?

Signed-off-by: NNUCJ <616151263@qq.com>
Copy link
Contributor

@whx-sjtu whx-sjtu left a comment

Choose a reason for hiding this comment

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

Please create a new context corresponding to super kernel with parameter to control whether enable it, in order to avoid code duplication. Refering to npu_stream_switch.

quantized_x_for_share, dynamic_scale_for_share = torch_npu.npu_dynamic_quant(
hidden_states)
if not is_prefill and self.enable_super_kernel:
with tng.scope.super_kernel(self.prefix, 'stream-funsion=1'):
Copy link
Contributor

Choose a reason for hiding this comment

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

Please create a new context corresponding to super kernel with parameter to control whether enable it, in order to avoid code duplication. Refering to npu_stream_switch.

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

Successfully merging this pull request may close these issues.

2 participants