Skip to content
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

add TopK op #5839

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

add TopK op #5839

wants to merge 30 commits into from

Conversation

Baiyuetribe
Copy link
Contributor

@Baiyuetribe Baiyuetribe commented Dec 21, 2024

  • 1D
  • 2D
  • 3D
    • dim=0
    • dim=1
    • dim=2
  • 4D
    • dim=0 x d
    • dim=1 x channel
    • dim=2
    • dim=3
  • pnnx_ci
  • sim_stl
  • pytest
  • ctest
  • 跨端兼容性

除了4D数据在d和channel维度求topk无法搞定外,其余都通过测试

@tencent-adm
Copy link
Member

tencent-adm commented Dec 31, 2024

CLA assistant check
All committers have signed the CLA.

@Baiyuetribe Baiyuetribe changed the title add TopK op [WIP]add TopK op Dec 31, 2024
@Baiyuetribe Baiyuetribe changed the title [WIP]add TopK op add TopK op Jan 6, 2025
@nihui
Copy link
Member

nihui commented Jan 6, 2025

ncnn/tests 缺少 test topk

src/layer/topk.h Outdated Show resolved Hide resolved
Copy link
Member

@nihui nihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top_blob_indices 数据应当使用 int 类型存储

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 87.89474% with 23 lines in your changes missing coverage. Please review.

Project coverage is 95.10%. Comparing base (ace8372) to head (3afcda7).

Files with missing lines Patch % Lines
src/layer/topk.cpp 87.89% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5839      +/-   ##
==========================================
- Coverage   95.10%   95.10%   -0.01%     
==========================================
  Files         824      825       +1     
  Lines      277477   277669     +192     
==========================================
+ Hits       263904   264073     +169     
- Misses      13573    13596      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

5 participants