Skip to content

Conversation

@lfalive
Copy link
Contributor

@lfalive lfalive commented May 30, 2025

@github-actions github-actions bot added the x86 label May 30, 2025
@tencent-adm
Copy link
Member

tencent-adm commented May 30, 2025

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.70%. Comparing base (73d8500) to head (f5dcba6).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6096      +/-   ##
==========================================
+ Coverage   95.59%   95.70%   +0.10%     
==========================================
  Files         827      827              
  Lines      270116   270122       +6     
==========================================
+ Hits       258226   258527     +301     
+ Misses      11890    11595     -295     

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

@github-actions
Copy link

The binary size change of libncnn.so (bytes)

architecture base size pr size difference
x86_64 16511232 16511232 0 😘
armhf 7369820 7369820 0 😘
aarch64 10775560 10775560 0 😘

@nihui nihui requested a review from Copilot May 30, 2025 08:53
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 PR optimizes the TanH function for x86 by introducing an AVX512 mask‐based remainder handling block to process elements that do not fill a complete 16-element vector. Key changes include:

  • Using AVX512 mask load/store instructions for the remainder elements.
  • Removing the previously nested SSE2/AVX preprocessor directives for this block.
  • Maintaining backwards compatibility with a fallback to SSE2/AVX code when AVX512F is not available.
Comments suppressed due to low confidence (1)

src/layer/x86/tanh_x86.cpp:53

  • [nitpick] Consider renaming 'remain' to 'remaining_elements' to enhance clarity.
const unsigned int remain = size - i;

@nihui nihui merged commit 7fd167f into Tencent:master May 30, 2025
79 of 81 checks passed
@nihui
Copy link
Member

nihui commented May 30, 2025

Thanks for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants