Repository navigation
[Common] Optimize grouped MXFP8 requantization - #3560
Oleg-Goncharov wants to merge 2 commits into
Conversation
[High impact] Replaces grouped MXFP8 requantization kernel with new implementation. Fix the missing CuTeDSL bridge interfaces before merging. Findings
SummaryReplaces the earlier fused path with grouped MXFP8 requantization and adds a CuTeDSL backend.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Compact rowwise MXFP8] --> B[Grouped requantize API]
B --> C{CuTeDSL available?}
C -->|Yes| D[CuTeDSL kernel]
C -->|No| E[CUDA kernel]
D --> F[Columnwise E4M3 and scales]
E --> F
D --> G[Optional BF16 output]
E --> G
Reviews (11) · Last reviewed commit: "Merge main into pr_requantize_mxfp8_perf" · Reviewed by Greptile |
|
@Oleg-Goncharov This PR seems to have some unrelated changes (like the nccl ep submodule). Could you fix that? |
de60011 to
b18d27e
Compare
2ecaf5f to
1e63df7
Compare
|
/te-ci |
|
@Oleg-Goncharov Please sign every commit in this PR. See https://github.com/NVIDIA/TransformerEngine/blob/main/CONTRIBUTING.rst#sign-your-work |
Signed-off-by: Oleg Goncharov <[email protected]>
1e63df7 to
ba75d00
Compare
Keep the replacement grouped MXFP8 requantization implementation and retain the new CUDA sources from main. Signed-off-by: Przemek Tredak <[email protected]>
| .value_or(false); | ||
| } | ||
|
|
||
| std::optional<tvm_ffi_bridge::TVMFFIKernel> get_kernel() const { |
There was a problem hiding this comment.
MXFP8RequantConfig::get_kernel uses tvm_ffi_bridge::TVMFFIKernel and make_tvm_ffi_kernel, but neither exists in the repository. Builds with NVTE_WITH_CUTEDSL=ON therefore fail while compiling this header, even when the backend is disabled at runtime.
Use std::optional<tvm::ffi::Function> throughout the cache, as the existing bridge expects.
Description
Add a fused grouped MXFP8 requantization path for Blackwell GPUs. The new operation converts compact rowwise MXFP8 input into columnwise E4M3 MXFP8 without materializing an intermediate high-precision tensor in global memory.
This reduces memory traffic compared with separate grouped dequantization and quantization calls. The kernel uses a tiled TMA pipeline and packed data movement/conversion operations, and supports both compact and GEMM-swizzled output scaling factors. The quantization configuration selects either an FP32 intermediate or a faster BF16 intermediate.
Type of change
Changes
Please list the changes introduced in this PR:
nvte_group_requantize_mxfp8C API for fused grouped rowwise-to-columnwise MXFP8 requantization.Checklist: