Skip to content

Conversation

@nihui
Copy link
Member

@nihui nihui commented Jan 6, 2026

No description provided.

@tencent-adm
Copy link
Member

tencent-adm commented Jan 6, 2026

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

Copilot AI left a 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_packed option 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]>
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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-commenter
Copy link

codecov-commenter commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 95.23810% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.29%. Comparing base (e5639d3) to head (b4d98e0).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/c_api.cpp 95.23% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a 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.

@nihui nihui closed this Jan 6, 2026
@nihui nihui reopened this Jan 6, 2026
@nihui nihui merged commit 6bc338e into Tencent:master Jan 6, 2026
108 of 109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants