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

BUG, SIMD: use scalar cmul on bad Apple clang x86_64 #24828

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

jakelishman
Copy link
Contributor

Apple clang 14.0.0 outputs code with non-deterministic behaviour for the AVX2-accelerated multiply ufunc on complex64 and complex128 for x86_64 on macOS with AVX2 enabled. This bug is fixed by Apple clang 14.0.3, but 14.0.0 is still commonly the available toolchain on CI images.

In order to not output unsound code, this simply skips the SIMD version of the ufunc when using an affected compiler.

Fix #24000.

Apple clang 14.0.0 outputs code with non-deterministic behaviour for the
AVX2-accelerated `multiply` ufunc on `complex64` and `complex128` for
x86_64 on macOS with AVX2 enabled.  This bug is fixed by Apple clang
14.0.3, but 14.0.0 is still commonly the available toolchain on CI
images.

In order to not output unsound code, this simply skips the SIMD version
of the ufunc when using an affected compiler.
@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Sep 28, 2023
@charris charris merged commit f2a9b50 into numpy:main Sep 28, 2023
50 checks passed
charris added a commit to charris/numpy that referenced this pull request Sep 28, 2023
* BUG, SIMD: use scalar cmul on bad Apple clang x86_64

Apple clang 14.0.0 outputs code with non-deterministic behaviour for the
AVX2-accelerated `multiply` ufunc on `complex64` and `complex128` for
x86_64 on macOS with AVX2 enabled.  This bug is fixed by Apple clang
14.0.3, but 14.0.0 is still commonly the available toolchain on CI
images.

In order to not output unsound code, this simply skips the SIMD version
of the ufunc when using an affected compiler.

* MAINT: Formatting cleanup.

---------

Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
@jakelishman jakelishman deleted the scalar-cmul-bad-apple-clang branch September 28, 2023 19:46
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Sep 28, 2023
charris added a commit that referenced this pull request Sep 28, 2023
BUG, SIMD: use scalar cmul on bad Apple clang x86_64 (#24828)
charris added a commit to charris/numpy that referenced this pull request Nov 11, 2023
* BUG, SIMD: use scalar cmul on bad Apple clang x86_64

Apple clang 14.0.0 outputs code with non-deterministic behaviour for the
AVX2-accelerated `multiply` ufunc on `complex64` and `complex128` for
x86_64 on macOS with AVX2 enabled.  This bug is fixed by Apple clang
14.0.3, but 14.0.0 is still commonly the available toolchain on CI
images.

In order to not output unsound code, this simply skips the SIMD version
of the ufunc when using an affected compiler.

* MAINT: Formatting cleanup.

---------

Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Multiply complex128 ufunc inconsistent with AVX2
2 participants