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

Disable Avx512 #408

Merged
merged 3 commits into from
Apr 29, 2024
Merged

Disable Avx512 #408

merged 3 commits into from
Apr 29, 2024

Conversation

mbkumar
Copy link
Collaborator

@mbkumar mbkumar commented Apr 23, 2024

Intel is deprecating AVX512 from their chips. And AMD implementation of AVX512 is a non-native implementation with two 256 bit registers concatenated. The current AVX512 optimization code is not working when compiled with Intel compilers because xsimd is generating 4 doubles for simd_t when Intel compiler is used. However the disabled code is expecting 8 doubles. We can forego this optimization for more portability.

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.55%. Comparing base (d830719) to head (f595c3d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #408   +/-   ##
=======================================
  Coverage   91.55%   91.55%           
=======================================
  Files          74       74           
  Lines       12911    12911           
=======================================
  Hits        11821    11821           
  Misses       1090     1090           
Flag Coverage Δ
unittests 91.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@landreman landreman self-requested a review April 24, 2024 10:06
@andrewgiuliani
Copy link
Contributor

This is a neat optimization that would be a shame to remove. I can't reproduce the issue locally because I have an 11th generation intel CPU.

The current AVX512 optimization code is not working when compiled with Intel compilers because xsimd is generating 4 doubles for simd_t when Intel compiler is used. However the disabled code is expecting 8 doubles.

I don't understand here, could you give more details?

@@ -129,6 +129,7 @@ using AlignedPaddedVec = std::vector<double, AlignedPaddedAllocator<double>>;
#endif

#if defined(USE_XSIMD)
/*
#if __AVX512F__
Copy link
Contributor

Choose a reason for hiding this comment

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

If AVX-512 is disabled, shouldn't __AVX512F__ not be defined, and this section of code would be avoided?

@mbkumar
Copy link
Collaborator Author

mbkumar commented Apr 24, 2024 via email

@andrewgiuliani
Copy link
Contributor

thanks for the explanation, I'm ok with merging this PR

@andrewgiuliani andrewgiuliani self-requested a review April 24, 2024 17:22
@mbkumar mbkumar merged commit fe1087e into master Apr 29, 2024
46 of 47 checks passed
@mbkumar mbkumar deleted the avx512 branch April 29, 2024 21:26
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.

3 participants