python: fix -Werror unused-parameter build break in init_gnn_submodule (pre-9.26 headers) - #728
Conversation
With pre-9.26 cuDNN headers (or _WIN32) the whole #if body compiles away and 'm' is unused; -Werror=unused-parameter then fails the pip source build (seen in containers shipping older cuDNN headers, where every 'pip install .' of current develop breaks). Mark it [[maybe_unused]]. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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 (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe GNN submodule initializer marks its module parameter as ChangesGNN warning handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This narrowly scoped build fix prevents an unused-parameter warning from failing builds with older cuDNN headers or on Windows; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description clearly explains the build failure, affected configurations, error, and fix. However, it omits the required template sections for affected area, API and compatibility impact, testing, related issues, and submission checklist items. Resolution Rewrite the description using the repository template. Add the affected area, API and compatibility impact, exact testing commands and results, related issue information or an explicit statement that none applies, and complete the license, pre-commit, and label checklist items. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
init_gnn_submodule(py::module_ &m)guards its whole body with#if CUDNN_VERSION >= 92600 && !defined(_WIN32)— against pre-9.26 cuDNN headers (or on Windows) the body compiles away,mis unused, and the build's-Werror=unused-parametermakes everypip install .of current develop fail:Seen wherever the source build runs inside a container shipping older cuDNN headers (e.g. recent NGC PyTorch images), while environments with 9.26+ headers build fine. Fix:
[[maybe_unused]]on the parameter.🤖 Generated with Claude Code
Summary by CodeRabbit