Skip to content

Add RVV implementation for log#6638

Merged
nihui merged 2 commits into
Tencent:masterfrom
ihb2032:opt/rvv-log
Apr 6, 2026
Merged

Add RVV implementation for log#6638
nihui merged 2 commits into
Tencent:masterfrom
ihb2032:opt/rvv-log

Conversation

@ihb2032
Copy link
Copy Markdown
Contributor

@ihb2032 ihb2032 commented Apr 4, 2026

Add log operator implementation using RVV intrinsics.

Signed-off-by: ihb2032 <hebome@foxmail.com>
@github-actions github-actions Bot added the riscv label Apr 4, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 4, 2026

Codecov Report

❌ Patch coverage is 68.59504% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.78%. Comparing base (6089953) to head (fcf6fed).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/layer/riscv/log_riscv_zfh.cpp 51.31% 37 Missing ⚠️
src/layer/riscv/log_riscv.cpp 97.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6638      +/-   ##
==========================================
+ Coverage   93.73%   93.78%   +0.05%     
==========================================
  Files         909      913       +4     
  Lines      286463   288299    +1836     
==========================================
+ Hits       268516   270383    +1867     
+ Misses      17947    17916      -31     

☔ 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
Copy Markdown
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.

Legacy layers from the Caffe era, whether in PyTorch or ONNX, will no longer convert to ncnn's Exp and Log, but instead use UnaryOp. However, since you've already optimized them, I believe necessary unit tests are essential. You need to add code like test_exp and test_log to your tests; you can refer to other test implementations for examples.

@github-actions github-actions Bot added the test label Apr 5, 2026
Signed-off-by: ihb2032 <hebome@foxmail.com>
Copy link
Copy Markdown
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.

LGTM

@nihui nihui merged commit 18ac4ca into Tencent:master Apr 6, 2026
95 of 97 checks passed
@nihui
Copy link
Copy Markdown
Member

nihui commented Apr 6, 2026

Thanks for your contribution !

@ihb2032 ihb2032 deleted the opt/rvv-log branch April 6, 2026 05:01
vlordier pushed a commit to vlordier/ncnn that referenced this pull request Apr 10, 2026
* rvv: add log
* add test

Signed-off-by: ihb2032 <hebome@foxmail.com>
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