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

Print AVX and AVX2 support when running CMake #1609

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

s-trinh
Copy link
Contributor

@s-trinh s-trinh commented Mar 9, 2025

Examples:

  • cmake ../visp:
--     CPU optimization:            SSE2 SSE3 SSSE3

--   C/C++:
--     Built as dynamic libs?:      yes
--     C++ Compiler:                /usr/bin/c++  (ver 13.3.0)
--     C++ flags (Release):         -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -msse2 -msse3 -mssse3 -fPIC -O3 -DNDEBUG
--     C++ flags (Debug):           -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -msse2 -msse3 -mssse3 -fPIC -g
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -msse2 -msse3 -mssse3 -fPIC -O3 -DNDEBUG
--     C flags (Debug):             -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -msse2 -msse3 -mssse3 -fPIC -g
  • cmake ../visp -DENABLE_AVX=ON: (ENABLE_AVX flag needs to be passed at first configuration and when using ccmake the CPU optimization output will be wrong even if the -mavx flag will be passed at compile time)
--     CPU optimization:            SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX

--   C/C++:
--     Built as dynamic libs?:      yes
--     C++ Compiler:                /usr/bin/c++  (ver 13.3.0)
--     C++ flags (Release):         -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -mavx -fPIC -O3 -DNDEBUG
--     C++ flags (Debug):           -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -mavx -fPIC -g
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -mavx -fPIC -O3 -DNDEBUG
--     C flags (Debug):             -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -mavx -fPIC -g
  • cmake ../visp -DENABLE_AVX=ON -DCMAKE_CXX_FLAGS=-mavx2 (AVX2 code are not used in ViSP, simdlib 3rd party should use its own CMake config ; probably -DENABLE_AVX=ON is not needed)
--     CPU optimization:            SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2

--   C/C++:
--     Built as dynamic libs?:      yes
--     C++ Compiler:                /usr/bin/c++  (ver 13.3.0)
--     C++ flags (Release):         -mavx2  -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -mavx -fPIC -O3 -DNDEBUG
--     C++ flags (Debug):           -mavx2  -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -mavx -fPIC -g
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -mavx -fPIC -O3 -DNDEBUG
--     C flags (Debug):             -Wall -Wextra -fopenmp -std=c++17 -fvisibility=hidden -mavx -fPIC -g

Copy link

codecov bot commented Mar 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.52%. Comparing base (577f226) to head (0050c7e).
Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1609   +/-   ##
=======================================
  Coverage   54.52%   54.52%           
=======================================
  Files         442      442           
  Lines       53480    53480           
=======================================
  Hits        29159    29159           
  Misses      24321    24321           

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

@fspindle
Copy link
Contributor

@s-trinh Thanks

@fspindle fspindle merged commit d0a35c4 into lagadic:master Mar 10, 2025
84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants