Repository navigation
Conversation
Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
…th in the test Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
[Medium impact] The reviewed changes appear safe to merge, with no actionable issues found. SummaryThis PR batches compatible FP8 current-scaling splits while keeping separate output tensors and one scale per split.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Split quantization request] --> B{Compatible quantizers and layout?}
B -- No --> C[Separate casts]
B -- Yes --> D{Bulk allocation enabled?}
D -- No --> C
D -- Yes --> E[Grouped maxima and per-split scales]
E --> F[Grouped cast]
F --> G[Separate tensor views]
Reviews (7) · Last reviewed commit: "Merge main into contrib/grouped-current-..." · Reviewed by Greptile |
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
|
Have you considered using |
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
|
Yes, I'd use |
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Description
This changes FP8 current scaling on the split-quantize path of grouped linear layers. Megatron's unfused expert path passes host-side split sizes when the grouped-tensor backend is disabled. Eligible splits use grouped kernels to compute their maxima, derive one scale per split and cast the input. The outputs retain their per-split tensor interface.
Distributed amax reduction keeps the existing per-split path so every rank issues the same collectives. The existing fused path selected by
use_grouped_tensor=Trueis unchanged.Type of change
Non-breaking optimization of an existing FP8 quantization path.
Changes
The fast path batches compatible current-scaling quantizers. Ineligible splits continue to use separate casts.
Validation
The regression compares FP8 output bytes (treating signed zeros as equal), inverse scales for nonempty splits and dequantized values against separate casts. It covers equal and uneven splits, empty experts, BF16 and FP32 inputs, and both rowwise-only and rowwise-plus-columnwise usage.
The remaining comparison needs a GPU that supports both backends. Please compare forward outputs, gradients and full-layer time for the baseline split path, the candidate split path and the existing grouped-tensor path with the same weights and expert split sizes. There are no same-hardware layer timings for this change yet.
The available native extension lacks
get_cublasLt_build_versionand does not include the candidate split implementation. Runs against that build do not validate this revision.Checklist