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

Support NCNN_ISA environment variable detection #5687

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

Conversation

inspireMeNow
Copy link
Contributor

@inspireMeNow inspireMeNow commented Sep 9, 2024

Changes:

  • Implemented get_isa_env function to retrieve and parse ISA flags from the environment variable.
  • Added environment detection tests to CMake configuration, setting ISA env flags based on the system architecture.

Signed-off-by: Kaiyao Duan [email protected]

@github-actions github-actions bot added the core label Sep 9, 2024
@inspireMeNow inspireMeNow changed the title feat: add support for NCNN_ISA environment variable detection [WIP] Add support for NCNN_ISA environment variable detection Sep 9, 2024
@inspireMeNow inspireMeNow changed the title [WIP] Add support for NCNN_ISA environment variable detection [WIP]Add support for NCNN_ISA environment variable detection Sep 9, 2024
@inspireMeNow inspireMeNow changed the title [WIP]Add support for NCNN_ISA environment variable detection [WIP]Support for NCNN_ISA environment variable detection Sep 10, 2024
@inspireMeNow inspireMeNow changed the title [WIP]Support for NCNN_ISA environment variable detection [WIP]Support NCNN_ISA environment variable detection Sep 10, 2024
Changes:
- Implemented `get_isa_env` function to retrieve and parse ISA flags from the environment variable.

Signed-off-by: Kaiyao Duan <[email protected]>
- Updated `get_isa_env` function to compare ISA flags without leading characters.
- Changed the way ISA flags are checked for various architectures, removing the leading '-' for better clarity.
- Update CPU feature checks to include base feature dependencies.

Signed-off-by: Kaiyao Duan <[email protected]>
- Added environment detection tests to CMake configuration, setting ISA env flags based on the system architecture for Linux, Windows, Darwin, and Android.

Signed-off-by: Kaiyao Duan <[email protected]>
@github-actions github-actions bot added the test label Oct 7, 2024
@inspireMeNow inspireMeNow changed the title [WIP]Support NCNN_ISA environment variable detection Support NCNN_ISA environment variable detection Oct 7, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 24.13793% with 22 lines in your changes missing coverage. Please review.

Project coverage is 89.99%. Comparing base (54d7c94) to head (af11223).
Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
src/cpu.cpp 24.13% 22 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5687       +/-   ##
===========================================
- Coverage   94.07%   89.99%    -4.08%     
===========================================
  Files         736      265      -471     
  Lines      229064    77480   -151584     
===========================================
- Hits       215497    69730   -145767     
+ Misses      13567     7750     -5817     

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

2 participants