Skip to content

Improve device-init grouped linear module with single grouped weight support #3224

Draft
zhongbozhu wants to merge 3 commits into
NVIDIA:mainfrom
zhongbozhu:improve_device_grouped_linear
Draft

Improve device-init grouped linear module with single grouped weight support #3224
zhongbozhu wants to merge 3 commits into
NVIDIA:mainfrom
zhongbozhu:improve_device_grouped_linear

Conversation

@zhongbozhu

Copy link
Copy Markdown
Collaborator

Description

Please include a brief summary of the changes, relevant motivation and context.

Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Change A
  • Change B

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@github-actions github-actions Bot added the community-contribution PRs from external contributor outside the core maintainers, representing community-driven work. label Jul 20, 2026
@zhongbozhu
zhongbozhu force-pushed the improve_device_grouped_linear branch from aa3b9d1 to 47ba66a Compare July 20, 2026 22:36
EXPERIMENTAL and subject to change. Gated by the
``NVTE_GROUPED_LINEAR_SINGLE_PARAM`` environment variable: if the env var
is not set this argument is forced to ``False`` with a warning.
grouped_gemm_backend : {"legacy", "grouped_tensor"}, default = None

@timmoon10 timmoon10 Jul 20, 2026

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.

It's unintuitive that grouped_gemm_backend="grouped_tensor" might end up using split-quantize internally. What do you think about the following:

  • "split_tensors": Use split-quantize impl
  • "grouped_tensor": User promises split points are valid for grouped GEMM kernel. Use grouped tensor impl, or error out if not supported.
  • "prefer_grouped_tensor": User promises split points are valid for grouped GEMM kernel. Use grouped tensor impl, or fallback to split-quantize impl if not supported.

Signed-off-by: Zhongbo Zhu <zhongboz@nvidia.com>
@zhongbozhu
zhongbozhu force-pushed the improve_device_grouped_linear branch from ff7eee2 to a43f70f Compare July 20, 2026 22:53
zhongbozhu and others added 2 commits July 20, 2026 17:09
Signed-off-by: Zhongbo Zhu <zhongboz@nvidia.com>
@staticmethod
def _is_grouped_tensor_path_supported(
*,
grouped_gemm_backend: str,

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.

If we accept raw str, lets make sure to document the allowed options in the docstring below

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

Labels

community-contribution PRs from external contributor outside the core maintainers, representing community-driven work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants