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

Add power9 support #360

Merged
merged 9 commits into from Dec 8, 2020
Merged

Add power9 support #360

merged 9 commits into from Dec 8, 2020

Conversation

shibatch
Copy link
Owner

This patch adds POWER9 support as mentioned in issue #313.

@RajalakshmiSR
Copy link

Thanks @shibatch for adding this. I am able to see -mcpu=power9 in the build log on POWER9.
However, when I run 'make test' with this patch on POWER8 system, I could still see the new vsx3 tests in log. Is this expected?

@shibatch
Copy link
Owner Author

shibatch commented Dec 1, 2020

@RajalakshmiSR Yes. If the IUT successfully detects that the corresponding vector extension is not available, it exits with SUCCESS code, displaying the following message.

[sleef-ppc64]~/work/sleef3/sleef-power9/build-ppc64le/bin$ ./iutvsx3


***** This host does not support the necessary CPU features to execute this program *****


0
[sleef-ppc64]~/work/sleef3/sleef-power9/build-ppc64le/bin$ ./tester ./iutvsx3


*** Now testing ./iutvsx3


***** This host does not support the necessary CPU features to execute this program *****




Tester : *** CPU does not support the necessary feature
[sleef-ppc64]~/work/sleef3/sleef-power9/build-ppc64le/bin$

@RajalakshmiSR
Copy link

@shibatch There are some ifdefs for clang and gcc in helperpower_128.h.
Gcc 7 supports vec_xxpermdi , __builtin_vsx_xvcvsxwdp, __builtin_vsx_xvcvdpsxws. If we expect minimum gcc version as 7, then we can remove the differences between clang and gcc. (Tried with ubuntu gcc 7.5)
Also __builtin_convertvector and vec_neg are available in GCC9 . So when we add minimum gcc version as 9, we can just make that code common for both clang and gcc.

@shibatch
Copy link
Owner Author

shibatch commented Dec 8, 2020

Those built-in functions are now used according to the gcc version by checking GNUC macro.
I manually ran the tests on gcc-6, gcc-7 and gcc-9, and they all worked.

@RajalakshmiSR
Copy link

LGTM. Thanks @shibatch

@shibatch shibatch merged commit be8783d into master Dec 8, 2020
5 checks passed
@shibatch
Copy link
Owner Author

shibatch commented Dec 8, 2020

Merged. Thank you for reviewing.

@shibatch shibatch deleted the add_power9_support branch December 8, 2020 23:45
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.

None yet

2 participants