Skip to content

fix: add cibuildwheel arch overrides to avoid host-native AVX-512 compilation#102

Open
XBeg9 wants to merge 1 commit intoalibaba:mainfrom
XBeg9:fix/cibuildwheel-arch-overrides
Open

fix: add cibuildwheel arch overrides to avoid host-native AVX-512 compilation#102
XBeg9 wants to merge 1 commit intoalibaba:mainfrom
XBeg9:fix/cibuildwheel-arch-overrides

Conversation

@XBeg9
Copy link

@XBeg9 XBeg9 commented Feb 13, 2026

Summary

  • Add cibuildwheel overrides to force specific architecture targets for manylinux builds
  • x86_64: Enable Haswell target (-DENABLE_HASWELL=ON)
  • aarch64: Enable ARMv8A target (-DENABLE_ARMV8A=ON)

This prevents the build from using host-native AVX-512 instructions that may not be available on all target machines.

Test plan

  • Verify CI builds pass for manylinux x86_64
  • Verify CI builds pass for manylinux aarch64

@CLAassistant
Copy link

CLAassistant commented Feb 13, 2026

CLA assistant check
All committers have signed the CLA.

@XBeg9 XBeg9 force-pushed the fix/cibuildwheel-arch-overrides branch from 748afe3 to 92f5390 Compare February 13, 2026 04:08
…pilation

Force specific architectures for manylinux builds:
- x86_64: Enable Haswell target
- aarch64: Enable ARMv8A target
@XBeg9 XBeg9 force-pushed the fix/cibuildwheel-arch-overrides branch from 92f5390 to 61d3922 Compare February 13, 2026 15:17
@XBeg9
Copy link
Author

XBeg9 commented Feb 13, 2026

Related to #101 but takes a different approach:

PR #101 adds a new X86_ARCH_NATIVE CMake flag that enables -march=native builds. This is useful for local development where you want to leverage all CPU features available on your machine. However, it also sets X86_ARCH_NATIVE="ON" as a default in pyproject.toml, which means wheel builds would use the CI machine's native instruction set—potentially including AVX-512 or other instructions not available on end-user machines.

This PR (#102) specifically targets cibuildwheel/CI builds by adding overrides that force safe, widely compatible architecture targets:

  • x86_64: Haswell (AVX2, no AVX-512)
  • aarch64: ARMv8A (baseline ARM64)

This ensures distributed wheels work on a broad range of hardware without illegal instruction errors (ref #92).

TL;DR: #101 is for local development flexibility; this PR is for ensuring distributed wheels have safe architecture targets in CI.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants