-
Notifications
You must be signed in to change notification settings - Fork 437
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
Fix AVX instructions used on CPUs that don't support them #1935
Fix AVX instructions used on CPUs that don't support them #1935
Conversation
It's supposed to check all bits are enabled, not just one of them. This causes a crash using OpenColorIO on older CPUs. Thanks to Ray Molenkamp for help tracking this down. Signed-off-by: Brecht Van Lommel <[email protected]>
CC @markreidvfx |
Thank you for the fix @brechtvl ! Do you have any more information about specifically which CPUs are affected? |
This was based on a bug report from a user, we haven't heard back from them yet to know the exact CPU model. But it was a relatively old one that support instructions only up to SSE 4.1. Still it's the AVX check that fails. So it wouldn't be surprising if CPUs that support up to SSE 4.2 are affected too, and that's the current minimum requirement for Blender, Maya and Houdini. But I don't know the exact conditions for when that XSAVE bit is enabled while the AVX bit is not. |
Linking this Blender issue, which seems to be the original report, for reference. |
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.
Good catch! That must have been tricky to track down. I think we also need to check both bits of the Extended Control Register register too.
Signed-off-by: Brecht Van Lommel <[email protected]>
08d9ea8
to
6802498
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.
LGTM. We will probably want to backport this to 2.3.
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 @brechtvl for this fix! My goal is to accelerate a 2.3.2 release due to this.
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.
LGTM! (Nasty one!)
@brechtvl , we noticed that Ray Molenkamp posted an OCIO_CPUINFO.exe in the Blender forum as a way of troubleshooting this. If you or he would like to contribute that to OCIO (e.g., under src/apps or share/troubleshooting), we would welcome that. |
…twareFoundation#1935) * Fix AVX instructions used on CPUs that don't support them It's supposed to check all bits are enabled, not just one of them. This causes a crash using OpenColorIO on older CPUs. Thanks to Ray Molenkamp for help tracking this down. Signed-off-by: Brecht Van Lommel <[email protected]> * Fix another case pointed out in review Signed-off-by: Brecht Van Lommel <[email protected]> --------- Signed-off-by: Brecht Van Lommel <[email protected]> (cherry picked from commit 0c90ded) Signed-off-by: Doug Walker <[email protected]>
* Fix ssse3 detection typo (#1929) Signed-off-by: Mark Reid <[email protected]> (cherry picked from commit 003b6a1) Signed-off-by: Doug Walker <[email protected]> * fix: use system `include pystring.h` for `ConfigUtils.cpp` (#1921) Signed-off-by: Rui Chen <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit e747e9c) Signed-off-by: Doug Walker <[email protected]> * Fix narrowing conversion error on riscv64 (#1924) Signed-off-by: phancb <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit a95febc) Signed-off-by: Doug Walker <[email protected]> * Add manylinux_2_28 Python wheels (#1933) Signed-off-by: Rémi Achard <[email protected]> Co-authored-by: Michael Dolan <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit f925099) Signed-off-by: Doug Walker <[email protected]> * Enhance ociochecklut to print the output after each step in a multi-t… (#1925) * Enhance ociochecklut to print the output after each step in a multi-transform LUT Signed-off-by: pylee <[email protected]> * Review feedback to enable printe of transforms list when using -s flag. Signed-off-by: pylee <[email protected]> * Print transform description for each step instead. Signed-off-by: pylee <[email protected]> --------- Signed-off-by: pylee <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit aadf595) Signed-off-by: Doug Walker <[email protected]> * Fix AVX instructions used on CPUs that don't support them (#1935) * Fix AVX instructions used on CPUs that don't support them It's supposed to check all bits are enabled, not just one of them. This causes a crash using OpenColorIO on older CPUs. Thanks to Ray Molenkamp for help tracking this down. Signed-off-by: Brecht Van Lommel <[email protected]> * Fix another case pointed out in review Signed-off-by: Brecht Van Lommel <[email protected]> --------- Signed-off-by: Brecht Van Lommel <[email protected]> (cherry picked from commit 0c90ded) Signed-off-by: Doug Walker <[email protected]> * Increment library version to 2.3.2 Signed-off-by: Doug Walker <[email protected]> --------- Signed-off-by: Mark Reid <[email protected]> Signed-off-by: Doug Walker <[email protected]> Signed-off-by: Rui Chen <[email protected]> Signed-off-by: phancb <[email protected]> Signed-off-by: Rémi Achard <[email protected]> Signed-off-by: pylee <[email protected]> Signed-off-by: Brecht Van Lommel <[email protected]> Co-authored-by: Mark Reid <[email protected]> Co-authored-by: Rui Chen <[email protected]> Co-authored-by: phanium <[email protected]> Co-authored-by: Rémi Achard <[email protected]> Co-authored-by: Michael Dolan <[email protected]> Co-authored-by: PenneLee <[email protected]> Co-authored-by: Brecht Van Lommel <[email protected]>
It's supposed to check all bits are enabled, not just one of them. This causes a crash using OpenColorIO on older CPUs.
Thanks to Ray Molenkamp for help tracking this down.