Skip to content

BUG: ASIMDDP CPU feature on ARM is not wired in #29570

@mgorny

Description

@mgorny

Describe the issue:

Not sure what the implications are, but right now the ASIMDDP feature, as defined here:

## ARMv8.2 dot product
ASIMDDP = mod_features.new(
'ASIMDDP', 6, implies: ASIMD,
args: {'val': '-march=armv8.2-a+dotprod', 'match': '-march=.*', 'mfilter': '\+.*'},
test_code: files(source_root + '/numpy/distutils/checks/cpu_asimddp.c')[0]
)

is not actually wired to ARM_FEATURES:

# TODO: Add support for MSVC
ARM_FEATURES = {
'NEON': NEON, 'NEON_FP16': NEON_FP16, 'NEON_VFPV4': NEON_VFPV4,
'ASIMD': ASIMD, 'ASIMDHP': ASIMDHP, 'ASIMDFHM': ASIMDFHM,
'SVE': SVE
}

As a result, specifying ASIMDDP in cpu-baseline results in a build failure.

Reproduce the code example:

python -m build -w -Csetup-args=-Dcpu-baseline=ASIMDDP

Error message:

* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - Cython>=3.0.6
  - meson-python>=0.18.0
* Getting build dependencies for wheel...
* Installing packages in isolated environment:
  - patchelf >= 0.11.0
* Building wheel...
+ /tmp/build-env-gqg69ed9/bin/python /home/mgorny/numpy/vendored-meson/meson/meson.py setup /home/mgorny/numpy /home/mgorny/numpy/.mesonpy-z4l3id1a -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dcpu-baseline=ASIMDDP --native-file=/home/mgorny/numpy/.mesonpy-z4l3id1a/meson-python-native-file.ini
The Meson build system
Version: 1.8.3
Source dir: /home/mgorny/numpy
Build dir: /home/mgorny/numpy/.mesonpy-z4l3id1a
Build type: native build
Project name: NumPy
Project version: 2.4.0.dev0+git20250814.8b89d0f
C compiler for the host machine: ccache cc (gcc 14.3.0 "cc (Gentoo Hardened 14.3.0 p8) 14.3.0")
C linker for the host machine: cc ld.bfd 2.44
C++ compiler for the host machine: ccache c++ (gcc 14.3.0 "c++ (Gentoo Hardened 14.3.0 p8) 14.3.0")
C++ linker for the host machine: c++ ld.bfd 2.44
Cython compiler for the host machine: cython (cython 3.1.3)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python found: YES (/tmp/build-env-gqg69ed9/bin/python)
Found pkg-config: YES (/usr/bin/pkg-config) 2.4.3
Run-time dependency python found: YES 3.13
Has header "Python.h" with dependency python-3.13: YES 
Compiler for C supports arguments -fno-strict-aliasing: YES 

../meson_cpu/meson.build:202:6: ERROR: Problem encountered: Invalid token "ASIMDDP" within option --cpu-baseline

A full log can be found at /home/mgorny/numpy/.mesonpy-z4l3id1a/meson-logs/meson-log.txt

ERROR Backend subprocess exited when trying to invoke build_wheel

Python and NumPy Versions:

Python 3.13.3
8b89d0f

Runtime Environment:

No response

Context for the issue:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions