Fix GroupedLinear FP8 calibration loop#3101
Conversation
Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
506ef2d to
08c86d7
Compare
Greptile SummaryThis PR fixes a bug in the FP8 calibration block of
Confidence Score: 5/5Safe to merge — the change is a one-block fix that removes clearly erroneous nested loops, with no logic changes elsewhere in the file. The original code had an outer loop whose variable i was immediately shadowed by two inner loops, causing every quantizer to be calibrated num_gemms times with the same tensor. The fix collapses the three loops into one correct loop. The change is minimal, easy to verify by inspection, and no other code paths are touched. No files require special attention; the single changed block is straightforward. Important Files Changed
Reviews (1): Last reviewed commit: "Fix grouped linear FP8 calibration loop" | Re-trigger Greptile |
Summary
GroupedLinearnum_gemmstimes for every GEMMValidation
python3 -m py_compile transformer_engine/pytorch/module/grouped_linear.pygit diff --check -- transformer_engine/pytorch/module/grouped_linear.py