Skip to content

fix: support linux/arm64 builds#1090

Open
Cynocracy wants to merge 4 commits into
quantumlib:mainfrom
Cynocracy:arm-detection-fixes
Open

fix: support linux/arm64 builds#1090
Cynocracy wants to merge 4 commits into
quantumlib:mainfrom
Cynocracy:arm-detection-fixes

Conversation

@Cynocracy

Copy link
Copy Markdown

The previous directives supported macos arm but did not correctly trigger off of macosx, this applies the same codepaths for linux arm, supporting them natively.

The previous directives supported macos arm but did not correctly trigger off of macosx, this applies the same codepaths for linux arm, supporting them natively.
@github-actions github-actions Bot added the size: S 10< lines changed <50 label Jul 6, 2026
@Cynocracy Cynocracy marked this pull request as ready for review July 6, 2026 16:51

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request restricts the compilation of x86-specific SIMD pybind modules (SSE, AVX2, AVX512) to x86 architectures in CMakeLists.txt and updates the instruction detection preprocessor checks in decide.cpp. Feedback on the changes points out that the updated preprocessor check using defined(_WIN32) will incorrectly evaluate to true on Windows ARM64, where the x86-specific cpuid intrinsic is unsupported, and suggests restricting the Windows check to x86/x64 architectures to prevent compilation failures.

Comment thread pybind_interface/decide/decide.cpp Outdated
Cynocracy and others added 2 commits July 6, 2026 09:54
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@Cynocracy

Copy link
Copy Markdown
Author

I /think/ the failures are unrelated to the changes I've made here, but let me know if they should be looked into 🫡

For context this change is useful for me to be able to support multi-arch docker images for qsim across arm/amd, the support for macos seems to prove out that the CPU is OK, this resulted from me looking into what would be needed to close the gap. No urgency on my part so if there are requested changes/improvements I'm all ears!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 10< lines changed <50

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant