-
-
Notifications
You must be signed in to change notification settings - Fork 11k
ENH: Extending CPU feature detection framework to support IBM Z SIMD #20552
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
Conversation
@seiko2plus Sayed, what's your progress? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @pradghos, along with the following suggestions we still need to add to test runtime detection similar to:
numpy/numpy/core/tests/test_cpu_features.py
Lines 140 to 147 in 93301a5
is_power = re.match("^(powerpc|ppc)64", machine, re.IGNORECASE) | |
@pytest.mark.skipif(not is_linux or not is_power, reason="Only for Linux and Power") | |
class Test_POWER_Features(AbstractTest): | |
features = ["VSX", "VSX2", "VSX3"] | |
features_map = dict(VSX2="ARCH_2_07", VSX3="ARCH_3_00") | |
def load_flags(self): | |
self.load_flags_auxv() |
we have several SIMD kernels now written by universal intrinsics, and more coming. I was working on s390x implementation but I pause it in favor of replacing/implementing more kernels to universal intrinsics first. |
Hi @seiko2plus, I have incorporated the review comments now, Thank you very much for the review ! |
We would like to extend CPU feature detection infrastructure for IBM Z CPU features. Eventually It will help to add and enable Z specific SIMD builtins and instructions. As part of the PR, we have extended ccompiler_opt.py, npy_cpu_features.c.src, npy_cpu_features.h, other files for Z CPU feature detection and added test files for VX/VXE/VXE2 in distutils/checks.
d83538f
to
9cedd78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Pradipta, I have updated the document of build options, and added extra tests for s390x to guarantee that IBM Z features don't get affected by future changes to our infrastructure.
Thanks @pradghos, @seiko2plus |
Excellent thank you @pradghos, @seiko2plus and @mattip |
x86_gcc="-msse -msse2", x86_icc="-msse -msse2", | ||
x86_iccw="/arch:SSE2", | ||
x86_msvc="/arch:SSE2" if self.march() == "x86" else "", | ||
ppc64_gcc= "-mcpu=power8", | ||
ppc64_clang="-maltivec -mvsx -mpower8-vector", | ||
armhf_gcc="-mfpu=neon-fp16 -mfp16-format=ieee", | ||
aarch64="" | ||
aarch64="", | ||
s390="-mzvector -march=arch12" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what a typo see #20588
Hi-five on merging your first pull request to NumPy, @pradghos! We hope you stick around! Your choices aren’t limited to programming – you can review pull requests, help us stay on top of new and old issues, develop educational material, work on our website, add or improve graphic design, create marketing materials, translate website content, write grant proposals, and help with other fundraising initiatives. For more info, check out: https://numpy.org/contribute/. |
We would like to extend CPU feature detection infrastructure for IBM Z CPU features.
Eventually It will help to add and enable Z specific SIMD builtins and instructions.
As part of the PR, we have extended
ccompiler_opt.py
,npy_cpu_features.c.src
,npy_cpu_features.h
, other files for Z CPU feature detection and added test files forVX/VXE/VXE2
indistutils/checks
.cc @edelsohn @Andreas-Krebbel @potula-chandra @ajaypvictor