Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Fix NEON_FP16 check for MSVC #29199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mousius
Copy link
Member

@Mousius Mousius commented Jun 12, 2025

The cast in numpy/distutils/checks/cpu_neon_fp16.c didn't compile correctly in MSVC, which lead to NEON reporting as unsupported due to it encompassing NEON_FP16 in meson_cpu/arm/meson.build.

I'm not an expert, but it appears fp16/fp16fml/dotprod are not supported in VS2022: https://learn.microsoft.com/en-us/cpp/build/reference/feature-arm64?view=msvc-170

Similarly, I don't think MSVC supports float16 as a type yet, so I've enabled emulation in the strided loop code.

The cast in `numpy/distutils/checks/cpu_neon_fp16.c` didn't compile correctly in MSVC, which lead to `NEON` reporting as unsupported due to it encompassing `NEON_FP16` in `meson_cpu/arm/meson.build`.

I'm not an expert, but it appears `fp16`/`fp16fml`/`dotprod` are not supported in VS2022:
https://learn.microsoft.com/en-us/cpp/build/reference/feature-arm64?view=msvc-170

Similarly, I don't think MSVC supports `float16` as a type yet, so I've enabled emulation in the strided loop code.
@Mousius Mousius changed the title Fix NEON_FP16 check for MSVC BUG: Fix NEON_FP16 check for MSVC Jun 12, 2025
@charris charris added 00 - Bug 09 - Backport-Candidate PRs tagged should be backported labels Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 09 - Backport-Candidate PRs tagged should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants