Skip to content

enhance: better auto-detect of SVE options for the bitset library #43833

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexanderguzhva
Copy link
Contributor

Enables the compilation of SVE code for the bitset library if a C++ compiler supports it.

There are two conditions for enabling the SVE code

  • a C++ compiler needs to have a -march=armv8-a+sve
  • arm_sve.h header must be available

AFAIK, gcc 7 does not support SVE, gcc 8 and gcc 9 support SVE, but have no arm_sve.h file, and only gcc 10 has both.

@sre-ci-robot sre-ci-robot added area/compilation size/M Denotes a PR that changes 30-99 lines. labels Aug 11, 2025
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alexanderguzhva
To complete the pull request process, please assign yanliang567 after the PR has been reviewed.
You can assign the PR to them by writing /assign @yanliang567 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify mergify bot added the dco-passed DCO check passed. label Aug 11, 2025
Copy link
Contributor

mergify bot commented Aug 11, 2025

@alexanderguzhva

Invalid PR Title Format Detected

Your PR submission does not adhere to our required standards. To ensure clarity and consistency, please meet the following criteria:

  1. Title Format: The PR title must begin with one of these prefixes:
  • feat: for introducing a new feature.
  • fix: for bug fixes.
  • enhance: for improvements to existing functionality.
  • test: for add tests to existing functionality.
  • doc: for modifying documentation.
  • auto: for the pull request from bot.
  1. Description Requirement: The PR must include a non-empty description, detailing the changes and their impact.

Required Title Structure:

[Type]: [Description of the PR]

Where Type is one of feat, fix, enhance, test or doc.

Example:

enhance: improve search performance significantly 

Please review and update your PR to comply with these guidelines.

@alexanderguzhva alexanderguzhva changed the title [Enhancement] better auto-detect of SVE options for the bitset library enhance: better auto-detect of SVE options for the bitset library Aug 11, 2025
@mergify mergify bot added kind/enhancement Issues or changes related to enhancement and removed do-not-merge/invalid-pr-format labels Aug 11, 2025
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.71%. Comparing base (1ced768) to head (4892fa6).

❌ Your project check has failed because the head coverage (73.71%) is below the target coverage (77.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (1ced768) and HEAD (4892fa6). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (1ced768) HEAD (4892fa6)
3 1
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #43833       +/-   ##
===========================================
- Coverage   79.33%   73.71%    -5.62%     
===========================================
  Files        1556      331     -1225     
  Lines      225160    32204   -192956     
===========================================
- Hits       178624    23740   -154884     
+ Misses      40074     8464    -31610     
+ Partials     6462        0     -6462     
Components Coverage Δ
Client ∅ <ø> (∅)
Core 73.71% <ø> (-0.01%) ⬇️
Go ∅ <ø> (∅)
Files with missing lines Coverage Δ
...ternal/core/src/bitset/detail/platform/dynamic.cpp 67.00% <ø> (ø)

... and 1228 files with indirect coverage changes

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

#set_source_files_properties(detail/platform/arm/sve-inst.cpp PROPERTIES COMPILE_FLAGS "-mcpu=neoverse-v1")
if (COMPILER_SUPPORTS_SVE AND COMPILER_HAS_ARM_SVE_HEADER)
message(STATUS "SVE support for the bitset library is enabled")
target_compile_definitions(milvus_bitset PRIVATE BITSET_ENABLE_SVE_SUPPORT=1)
Copy link
Member

Choose a reason for hiding this comment

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

Should we enlarge the scope?

@@ -622,7 +622,7 @@ init_dynamic_hook() {
#endif

#if defined(__aarch64__)
#if defined(__ARM_FEATURE_SVE)
Copy link
Member

Choose a reason for hiding this comment

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

Why we change the macro? I thought this __ARM_FEATURE_SVE will be auto-enabled once we set the flag during the compilation? Plz CMIIW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/compilation dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants