【Hackathon 10th Spring No.45-part2】Add missing cpp_extensions.cc compile guards for SM70/SM75#6977
Open
cloudforge1 wants to merge 1 commit intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
87e2426 to
d45e88c
Compare
…0/SM75 Additive fix on top of merged PaddlePaddle#6488: - Add #ifdef ENABLE_SM75_EXT_OPS guard for 5 cutlass/FP8 op registrations (prevents linker error on SM70) - Add #ifdef ENABLE_SM80_EXT_OPS guard for 7 tail MoE/MLA op registrations (prevents linker error on SM70/SM75) Uses ENABLE_SM75_EXT_OPS (passed to both cxx and nvcc compilers) instead of ENABLE_SCALED_MM_C2X (nvcc-only) for the cutlass guard, since cpp_extensions.cc is compiled by the host C++ compiler.
d45e88c to
975e788
Compare
5 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6977 +/- ##
==========================================
Coverage ? 73.71%
==========================================
Files ? 399
Lines ? 55950
Branches ? 8828
==========================================
Hits ? 41246
Misses ? 11784
Partials ? 2920
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
PR #6488 (merged as
-part) introduced T4/V100 compile support but left two registration blocks incpp_extensions.ccunguarded:.cusources compile only at SM≥75, but registration is unconditional → linker error on V100 (SM70)This is a minimal, additive-only fix — 4 lines added, 0 lines removed. See PR #6941 for a full wholesale replacement alternative.
Modifications
custom_ops/gpu_ops/cpp_extensions.cc: Add#ifdef ENABLE_SM75_EXT_OPS/#endifaround 5 cutlass/FP8 ops. Add#ifdef ENABLE_SM80_EXT_OPS/#endifaround 7 tail MoE ops.No changes to
setup_ops.py— keeps #6488's code as-is.Usage or Command
No user-facing changes. Build correctly gates ops per SM tier after this fix.
Accuracy Tests
Guard macro verified in
setup_ops.py:ENABLE_SM75_EXT_OPSandENABLE_SM80_EXT_OPSare both incc_compile_args(host compiler visibility — required for.ccfiles).Wholesale version tested on Baidu AI Studio V100 (pipeline
p-1051a228d3c7).Checklist
cc_compile_args)