mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #535] VNNI code path is compiled even on a CPU without it #215
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#215
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @biochem-fan on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/535
When compiling the latest version (v1.1.29), I got this failure:
I am using Rocky Linux 9 with GCC 11.5.0. Certainly my compiler toolchain does not support VNNI (see https://github.com/opencv/opencv/issues/29840).
But my CPU is AMD EPYC 7713 (Zen3, Milan) and does not support VNNI anyway. Thus, the VNNI code path should not be selected. I guess there is a bug in the compiler flag selection. Indeed, the auto-generated
build/build.ninjacontains-mavx512f -mavx512bw -mavx512vl -mavx512dq -mavx512vnni -mavx512vbmi -mf16c -mfma.How can I disable it and force the AVX2 code path? Any help would be greatly appreciated.
@biochem-fan commented on GitHub (Oct 27, 2026):
As a temporary workaround, I installed the latest GCC from conda.
Compilation proceeded further than before but failed in the last step:
This usually means a missing
-fPICflag but I am not sure why others do not have this problem.@mw00 commented on GitHub (Oct 27, 2026):
Thanks for the report. The flags are on purpose: that one file is always built with AVX-512, and the engine picks its kernel at run time, so on your EPYC 7713 the AVX2 path runs. The real problem was the toolchain: Rocky 9's GCC 11 + binutils 2.35 can't assemble that instruction. From v1.1.34 the build checks this at configure time. If the assembler can't do it, the file is built with AVX-512 BW instructions that give the same sums. No action needed on your side - a plain
./setup.shwith the system GCC should build.The conda error (
failed to set dynamic section sizes: bad value) comes from mixing conda's linker with the system's libraries. With v1.1.34 you won't need the conda GCC.Closing - please reopen if it comes back.
Released in v1.1.34: https://github.com/mw00/project-maya/releases/tag/v1.1.34
@biochem-fan commented on GitHub (Oct 28, 2026):
@mw00 Thank you very much for your support.
I checked out the latest version into a new directory and tried to build afresh outside conda, using the system compilers.
Unfortunately, the "Error: unsupported instruction `vpdpbusd'" message persisted.
(I cannot reopen this issue; GitHub says I do not have the permission)
@biochem-fan commented on GitHub (Oct 28, 2026):
I don't know why but your compiler check
surprisingly passes on our system.
So I explicitly set
MAYA_CPU_VNNI_EMULATE=ON.The problem persisted, though.
Your fix applies to
src/kernels/cpu/expert.cppbutsrc/ds4/ds4_gguf_cpu.cppis also problematic.