-
Notifications
You must be signed in to change notification settings - Fork 4.4k
c-api / pyncnn expose more option setter getter #6489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request exposes additional option setter and getter methods in the C API for the NCNN library, enabling more fine-grained control over inference options. The changes include adding getter methods for 14 existing option flags and reorganizing the C API header for better readability. Additionally, the Python bindings are updated to expose the use_bf16_packed option.
- Added getter and setter functions for 14 option flags in the C API (use_local_pool_allocator, use_winograd_convolution, use_sgemm_convolution, use_packing_layout, various fp16/int8/bf16 options, use_shader_local_memory, use_cooperative_matrix)
- Reorganized C API header to group getters and setters together
- Added comprehensive C API tests for all new getter/setter functions
- Exposed
use_bf16_packedoption in Python bindings with corresponding tests
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/c_api.h | Reorganized and added 14 getter declarations and standardized setter declarations with enable parameter naming |
| src/c_api.cpp | Implemented 14 new getter functions and relocated setter implementations for better organization |
| tests/test_c_api.cpp | Added test_c_api_3() function with comprehensive tests for all new option getters/setters |
| python/src/main.cpp | Added use_bf16_packed property to Python Option class bindings |
| python/tests/test_option.py | Added test coverage for use_bf16_packed option in Python |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6489 +/- ##
========================================
Coverage 93.28% 93.29%
========================================
Files 842 845 +3
Lines 265270 265560 +290
========================================
+ Hits 247450 247744 +294
+ Misses 17820 17816 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.