-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Python][C++] pyarrow._compute Contains AVX Instructions During Import #49640
Copy link
Copy link
Open
Labels
Description
Describe the bug, including details regarding any error messages, version, and platform.
According to the Arrow C++ environment variables documentation, the default SIMD level is SSE4.2. However, importing pyarrow._compute executes AVX instructions even when running on a CPU that only supports up to SSE4.2.
Reproduction
Setup venv and install pyarrow from PyPI:
$ python -m venv venv && venv/bin/pip install --no-cache pyarrow
... Successfully installed pyarrow-23.0.1Then run the Python interpreter under QEMU emulating a Westmere CPU (which supports SSE4.2 but not AVX):
$ qemu-x86_64-static -cpu Westmere venv/bin/python -c 'import pyarrow._compute'
qemu: uncaught target signal 4 (Illegal instruction) - core dumpedThe disassembly of the coredump shows that it uses AVX instructions.
(gdb) disassemble $pc-16,$pc+16
Dump of assembler code from 0x7f2ff65ceb32 to 0x7f2ff65ceb52:
0x00007f2ff65ceb32: push r12
0x00007f2ff65ceb34: push rbp
0x00007f2ff65ceb35: mov rbp,rdi
0x00007f2ff65ceb38: push rbx
0x00007f2ff65ceb39: sub rsp,0x48
0x00007f2ff65ceb3d: call 0x7f2ff5c3c1d0
=> 0x00007f2ff65ceb42: vmovdqu xmm0,XMMWORD PTR [rax]
0x00007f2ff65ceb46: vpextrq rax,xmm0,0x1
0x00007f2ff65ceb4c: vmovdqa XMMWORD PTR [rsp+0x10],xmm0Setting ARROW_USER_SIMD_LEVEL to None or SSE4_2 didn't help.
Edit: I am using Linux x86-64 with Python 3.14.
Component(s)
Python
Reactions are currently unavailable