-
Notifications
You must be signed in to change notification settings - Fork 431
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 <brecht@blender.org>
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 <brecht@blender.org>
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 <brecht@blender.org> * Fix another case pointed out in review Signed-off-by: Brecht Van Lommel <brecht@blender.org> --------- Signed-off-by: Brecht Van Lommel <brecht@blender.org> (cherry picked from commit 0c90ded) Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Fix ssse3 detection typo (#1929) Signed-off-by: Mark Reid <mindmark@gmail.com> (cherry picked from commit 003b6a1) Signed-off-by: Doug Walker <doug.walker@autodesk.com> * fix: use system `include pystring.h` for `ConfigUtils.cpp` (#1921) Signed-off-by: Rui Chen <rui@chenrui.dev> Co-authored-by: Doug Walker <doug.walker@autodesk.com> (cherry picked from commit e747e9c) Signed-off-by: Doug Walker <doug.walker@autodesk.com> * Fix narrowing conversion error on riscv64 (#1924) Signed-off-by: phancb <nxhsdu@qq.com> Co-authored-by: Doug Walker <doug.walker@autodesk.com> (cherry picked from commit a95febc) Signed-off-by: Doug Walker <doug.walker@autodesk.com> * Add manylinux_2_28 Python wheels (#1933) Signed-off-by: Rémi Achard <remiachard@gmail.com> Co-authored-by: Michael Dolan <michdolan@gmail.com> Co-authored-by: Doug Walker <doug.walker@autodesk.com> (cherry picked from commit f925099) Signed-off-by: Doug Walker <doug.walker@autodesk.com> * 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 <penne.y.lee@intel.com> * Review feedback to enable printe of transforms list when using -s flag. Signed-off-by: pylee <penne.y.lee@intel.com> * Print transform description for each step instead. Signed-off-by: pylee <penne.y.lee@intel.com> --------- Signed-off-by: pylee <penne.y.lee@intel.com> Co-authored-by: Doug Walker <doug.walker@autodesk.com> (cherry picked from commit aadf595) Signed-off-by: Doug Walker <doug.walker@autodesk.com> * 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 <brecht@blender.org> * Fix another case pointed out in review Signed-off-by: Brecht Van Lommel <brecht@blender.org> --------- Signed-off-by: Brecht Van Lommel <brecht@blender.org> (cherry picked from commit 0c90ded) Signed-off-by: Doug Walker <doug.walker@autodesk.com> * Increment library version to 2.3.2 Signed-off-by: Doug Walker <doug.walker@autodesk.com> --------- Signed-off-by: Mark Reid <mindmark@gmail.com> Signed-off-by: Doug Walker <doug.walker@autodesk.com> Signed-off-by: Rui Chen <rui@chenrui.dev> Signed-off-by: phancb <nxhsdu@qq.com> Signed-off-by: Rémi Achard <remiachard@gmail.com> Signed-off-by: pylee <penne.y.lee@intel.com> Signed-off-by: Brecht Van Lommel <brecht@blender.org> Co-authored-by: Mark Reid <mindmark@gmail.com> Co-authored-by: Rui Chen <rui@chenrui.dev> Co-authored-by: phanium <91544758+phanen@users.noreply.github.com> Co-authored-by: Rémi Achard <remiachard@gmail.com> Co-authored-by: Michael Dolan <michdolan@gmail.com> Co-authored-by: PenneLee <penne.y.lee@intel.com> Co-authored-by: Brecht Van Lommel <brecht@blender.org>
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.