Skip to content

[Common] MXFP8 dequantization CuTeDSL kernels - #3842

Open
kainzhong wants to merge 40 commits into
NVIDIA:mainfrom
kainzhong:cutedsl_mxfp8_dequant
Open

kainzhong wants to merge 40 commits into
NVIDIA:mainfrom
kainzhong:cutedsl_mxfp8_dequant

Conversation

@kainzhong

Copy link
Copy Markdown
Collaborator

Description

Add MXFP8 dequantization CuTeDSL kernels

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:

  • MXFP8 CuTeDSL dequantization kernel

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

kainzhong and others added 30 commits October 7, 2026 07:22
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
kainzhong and others added 10 commits October 19, 2026 21:23
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
The more_cutedsl_mxfp8_specialized base was squash-merged as NVIDIA#3642, so
CuTeDSL conflicts were resolved by 3-way merging against 44d2c22, the
last base-branch commit merged here. CuTeDSL/__init__.py: register both
get_mxfp8_dequantization_function and NVIDIA#3560's
get_mxfp8_requantization_function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches MXFP8 dequantization in the shared cast path.

Fix the missing reporting function calls before merging; they block builds with CuTeDSL support.

Findings

  1. P1 CuTeDSL builds fail ▶

Summary

Adds CuTeDSL kernels for MXFP8 dequantization.

  • MXFP8 dequantization can now run through CuTeDSL.

Builds with CuTeDSL support are blocked by calls to a missing reporting function. Runtime tests were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[MXFP8 dequantize] --> B{CuTeDSL enabled and supported?}
  B -->|No| C[CUDA kernel]
  B -->|Yes| D[Load or compile registered kernel]
  D --> E{Kernel available?}
  E -->|No| C
  E -->|Yes| F[Choose rowwise data if present]
  F --> G[Load tiles and apply scales]
  G --> H[Write higher-precision output]
Loading

Reviews (1) · Last reviewed commit: "Merge branch 'main' into cutedsl_mxfp8_d..." · Reviewed by Greptile

// Signature mirrors mxfp8::dequantize. Returns false to fall back to the CUDA kernel.
inline bool mxfp8_dequantize_cutedsl(const Tensor &input, Tensor *output, cudaStream_t stream) {
if (!tvm_ffi_bridge::TVMFFICentral::getInstance().get_cutedsl_backend_enabled()) {
maybe_warn_cutedsl_not_chosen("the CuTeDSL backend is disabled.");

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.

P1 CuTeDSL builds fail

maybe_warn_cutedsl_not_chosen is not declared or defined anywhere in the repository. Builds with NVTE_WITH_CUTEDSL include this header and fail to compile, even when the backend is disabled at runtime. Replace all three calls here and at lines 105 and 114 with TVMFFICentral::getInstance().report_not_chosen(...), the existing reporting method.

This branch has not been deployed

No deployments
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.

2 participants