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

avx512 abs: refine GCC compiler checks for _mm512{,_mask}_abs_pd #1118

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

thomas-schlichter
Copy link
Contributor

Fix check for gcc bug in abs.h .

The gcc bug is described here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87467

It is fixed in versions 7.4.0 and 8.3.0 and above.

@@ -524,7 +524,7 @@ simde_mm512_mask_abs_ps(simde__m512 src, simde__mmask16 k, simde__m512 v2) {
SIMDE_FUNCTION_ATTRIBUTES
simde__m512d
simde_mm512_abs_pd(simde__m512d v2) {
#if defined(SIMDE_X86_AVX512F_NATIVE) && (!defined(HEDLEY_GCC_VERSION) || HEDLEY_GCC_VERSION_CHECK(8,3,0))
#if defined(SIMDE_X86_AVX512F_NATIVE) && (!defined(HEDLEY_GCC_VERSION) || (HEDLEY_GCC_VERSION_CHECK(7,4,0) && !HEDLEY_GCC_VERSION_CHECK(8,0,0)) || HEDLEY_GCC_VERSION_CHECK(8,3,0))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you move this logic to simde/simde-common.h by defining a SIMDE_BUG_GCC_87467 there?

See

simde/simde/simde-common.h

Lines 973 to 976 in fdbd6b2

#if !defined(SIMDE_IGNORE_COMPILER_BUGS)
# if defined(HEDLEY_GCC_VERSION)
# if !HEDLEY_GCC_VERSION_CHECK(4,9,0)
# define SIMDE_BUG_GCC_REV_208793
and onwards

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see. I will do so. Thanks!

simde/x86/avx512/abs.h Outdated Show resolved Hide resolved
@mr-c mr-c changed the title Fix for issue #1117 avx512 abs: refine GCC compiler checks for _mm512{,_mask}_abs_pd Dec 14, 2023
The gcc bug is described here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87467

It is fixed in versions 7.4.0 and 8.3.0 and above.
@mr-c mr-c enabled auto-merge (squash) December 14, 2023 16:41
auto-merge was automatically disabled December 14, 2023 16:42

Head branch was pushed to by a user without write access

@mr-c mr-c enabled auto-merge (squash) December 14, 2023 16:44
@mr-c
Copy link
Collaborator

mr-c commented Dec 14, 2023

Thank you @thomas-schlichter ; if you know of a project using SIMDe that can be listed publicly, it would be nice to add that to https://github.com/simd-everywhere/simde/wiki/Projects-Using-SIMDe

@thomas-schlichter
Copy link
Contributor Author

Yes, OpenAirInterface (https://gitlab.eurecom.fr/oai/openairinterface5g/) is using it. It is quite a big project and we are just one of many contributors, so I don't know if I would have the right to add it there myself... ;-)

@mr-c
Copy link
Collaborator

mr-c commented Dec 14, 2023

Yes, OpenAirInterface (https://gitlab.eurecom.fr/oai/openairinterface5g/) is using it. It is quite a big project and we are just one of many contributors, so I don't know if I would have the right to add it there myself... ;-)

That is really cool! I've gone and added it to the list myself.

@mr-c mr-c disabled auto-merge December 15, 2023 17:49
@mr-c mr-c merged commit 5405bbd into simd-everywhere:master Dec 15, 2023
75 of 77 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