-
Notifications
You must be signed in to change notification settings - Fork 49
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
Use AVX* instructions on default build on amd64 #157
Comments
Thank you for this post. Kind regards, |
I had a deeper look. I am assuming you are using 64-bit architecture.
I am about to release a new version.
My worry is that
It might be also useful to change the code around get_cpu_ext_level() to
You can wait for the new release -- should be today or tomorrow (Sydney time). You can test these suggestions. Hope this help. Kind regards, |
Ofc 64bit: If you can commit these changes, testing will be easier. |
Same error. |
Thank you for putting this in. Just to keep you in the picture. The source of the problem is that clang inserts vzeroupper instruction in a normal C++ function (where no intrinsics are used). It does this at the end of the function, just before returning. One solution could have been using the following compiler flags
But the solution I implemented is better. See how it goes with you and if this solves the problem, please let me know. Cheers, PS: See this https://stackoverflow.com/questions/68736527/do-i-need-to-use-mm256-zeroupper-in-2021 |
Fixed in version 0.18.0. Thanks! Offtopic: $ readelf -d /usr/local/lib/libopenjph.so | grep SONAME
0x000000000000000e SONAME Library soname: [libopenjph.so.0.18] SONAME "must be" Patch: --- src/core/CMakeLists.txt.orig 2024-11-10 02:36:26 UTC
+++ src/core/CMakeLists.txt
@@ -133,9 +133,9 @@ else()
PROPERTIES
OUTPUT_NAME "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}")
else()
- set(OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}")
+ set(OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR}")
set_target_properties(openjph
PROPERTIES
- SOVERSION "${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}"
+ SOVERSION "${OPENJPH_VERSION_MAJOR}"
VERSION "${OPENJPH_VERSION}")
endif() |
Thank you for the suggestion regarding the SONAME name. I am aware that this is not what is expected -- as in issue #155. Kind regards, |
Thanks. |
OS: FreeBSD 14.1 amd64.
CPU: Core 2 Quad Q6600.
Build OpenJPH 0.17.0 from ports without
-march
and with-march=core2
- same result.Dependencies list: smplayer => qt5 => kf5-kimageformats => libheif => OpenJPH.
AFAIU:
0xC5 0xF8 0x77
= vzeroupper from AVX.https://fuchsia.googlesource.com/third_party/llvm-project/+/refs/tags/llvmorg-13.0.0-rc1/llvm/test/CodeGen/X86/fma.ll?autodive=0%2F%2F%2F%2F%2F%2F%2F%2F#665
https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#New_instructions
Runtime detection of supported SIMD level in init_cpu_ext_level() work well, but OpenJPH still use instructions from unsupported SIMDs on current CPU.
There are build options:
If I build with
-DOJPH_DISABLE_SSE4=ON -DOJPH_DISABLE_AVX=ON -DOJPH_DISABLE_AVX2=ON -DOJPH_DISABLE_AVX512=ON
then smplayer run and work fine.The text was updated successfully, but these errors were encountered: