Open steve-jeffrey opened 2 years ago
This seems really difficult to fix. The purpose of building the three modules is to allow runtime machine architecture detection, and is necessary in order to distribute binary wheels that work across machines. Removing the -mno-avx2
argument could result in bad wheels.
You might be able to use the bazel dev wheel build as a workaround?
Yes, bazel
can build the wheel on aarch64
:
bazel build stim_dev_wheel
Are there similar commands for building the cirq
, zx
and sinter
packages using bazel
? The developer_documentation.md
file provides pip
commands for building those packages, but not bazel
commands.
What happened?
Building the Python API failed because the
sse2
andavx2
extensions are not relevant in the aarch64 environment.How to reproduce the issue
Relevant log output
Other information If the
sse2
andavx2
sections insetup.py
are removed, the API build successfully and all tests pass.To remove those sections, apply the attached setup.py_patch.txt:
patch setup.py setup.py_patch.txt
Environment Stim commit 81142ac
Ubuntu 20.04, GCC 9.4.0, Ampere Altra Max without SSE, SSE2, AVX and AVX2
Note: the issue does not occur in this environment: Fedora 35, GCC 11.3.1, Intel architecture with SSE, SSE2, AVX and AVX2