Skip to content

Add multi_tensor_raw_moments kernel#3144

Draft
philipcmonk wants to merge 2 commits into
NVIDIA:mainfrom
philipcmonk:pmonk/metrics
Draft

Add multi_tensor_raw_moments kernel#3144
philipcmonk wants to merge 2 commits into
NVIDIA:mainfrom
philipcmonk:pmonk/metrics

Conversation

@philipcmonk

Copy link
Copy Markdown

Description

This introduces a multi_tensor kernel for computing the first four raw moments (power sums).

These statistics are being added to Megatron in this PR, and this kernel speeds them up significantly. It may be worth waiting for that PR to be merged to ensure no further functionality is needed.

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

This is closely modeled after multi_tensor_l2norm.

This is my first PR to TransformerEngine, so let me know if there's anything else you need.

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

Signed-off-by: Philip Monk <pmonk@nvidia.com>
@github-actions github-actions Bot added the community-contribution PRs from external contributor outside the core maintainers, representing community-driven work. label Jun 25, 2026
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.

1 participant