Skip to content

MoE histc / _grouped_mm - #4514

Open
jloftin-nv wants to merge 1 commit into
pytorch:mainfrom
jloftin-nv:dev-jloftin-moe-convert
Open

MoE histc / _grouped_mm#4514
jloftin-nv wants to merge 1 commit into
pytorch:mainfrom
jloftin-nv:dev-jloftin-moe-convert

Conversation

@jloftin-nv

@jloftin-nv jloftin-nv commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

Default transformers MoE forwarding emits aten.histc and aten._grouped_mm per layer. Neither has a converter, so MoE graphs shatter into roughly 3 * layers + 1 engines despite high reported coverage.

Add converters for histc and dense _grouped_mm so MoE blocks can stay in a single TensorRT engine where shapes allow.

Type of change

Please delete options that are not relevant and/or add your own.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • [ X] My code follows the style guidelines of this project (You can use the linters)
  • [ X] I have performed a self-review of my own code
  • [ X] I have commented my code, particularly in hard-to-understand areas and hacks
  • [ X] I have made corresponding changes to the documentation
  • [ X] I have added tests to verify my fix or my feature
  • [ X] New and existing unit tests pass locally with my changes
  • [ X] I have added the relevant labels to my PR in so that relevant reviewers are notified

@github-actions github-actions Bot added component: tests Issues re: Tests component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: converters Issues re: Specific op converters component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Aug 18, 2026
@jloftin-nv jloftin-nv changed the title Make dryrun stats observable MoE histc / _grouped_mm Aug 18, 2026
@meta-cla meta-cla Bot added the cla signed label Aug 18, 2026
@github-actions
github-actions Bot requested a review from cehongwang August 18, 2026 21:54
@narendasan
narendasan requested a review from zewenli98 August 18, 2026 22:55
@zewenli98

Copy link
Copy Markdown
Collaborator

Hi @jloftin-nv I didn't read the PR thoroughly yet. just wanted to know if we can use TRT IMoELayer somewhere?

@lanluo-nvidia lanluo-nvidia added this to the v2.15.0 milestone Aug 20, 2026
@jloftin-nv

Copy link
Copy Markdown
Contributor Author

Hi @jloftin-nv I didn't read the PR thoroughly yet. just wanted to know if we can use TRT IMoELayer somewhere?

I think we can in a follow up PR

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

Labels

cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: tests Issues re: Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants