Move nvfp4_quant.py from gemm to common#1817
Conversation
Signed-off-by: Shiyang Chen <shiychen@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughUpdated NVFP4 quantization docstrings and import statements so attention and GEMM code reference the shared ChangesShared NVFP4 path updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
cjluo-nv
left a comment
There was a problem hiding this comment.
Bot review — DM the bot to share feedback.
Clean, complete file move of nvfp4_quant.py from kernels/quantization/gemm/ to kernels/quantization/common/. Verified: the file is present in common/ and gone from gemm/; all five importing modules (gemm/fp4_kernel.py, gemm/fp4_kernel_hopper.py, gemm/gptq_fused_kernel.py, gemm/nvfp4_fp8_sweep.py, attention/p_qdq.py) now import via ..common.nvfp4_quant with correct (alphabetical) import ordering; docstring cross-references in the moved file, fp8_quant.py, and attention/__init__.py are updated to the new relative paths. No dangling old-path references remain (apparent search-index hits were stale — confirmed by fetching actual file contents). The two unrelated nvfp4_quant matches (quant_conv.py, test_quant_conv.py) are a different symbol and untouched. No __init__.py re-export changes were needed. Behavior-preserving, no licensing changes (standard NVIDIA header retained), and no tests required for a mechanical move. No injection content in the untrusted blocks.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1817 +/- ##
==========================================
- Coverage 77.11% 76.75% -0.36%
==========================================
Files 513 513
Lines 56889 56889
==========================================
- Hits 43868 43664 -204
- Misses 13021 13225 +204
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What does this PR do?
Type of change: small improvement
Move nvfp4_quant.py from gemm to common
Testing
unittests
Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.).CONTRIBUTING.md: N/AAdditional Information
Summary by CodeRabbit