mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4970] [Engine] dsv41: build ds4_gguf_cpu.cpp's AVX-VNNI tier only where CMake's check passes (GCC 11 + binutils 2.35 on RHEL/Alma/Rocky 9 stopped at vpdpbusd) #5273
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5273
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4970
Author: @yazun
Created: 11/2/2026
Status: 🔄 Open
Base:
main← Head:fix/dsv41-avxvnni-probe📝 Commits (1)
a00cb1a[Engine] dsv41: build ds4_gguf_cpu.cpp's AVX-VNNI tier only where CMake's check passes (GCC 11 + binutils 2.35 on RHEL/Alma/Rocky 9 stopped at vpdpbusd)📊 Changes
2 files changed (+10 additions, -3 deletions)
View changed files
📝
CMakeLists.txt(+5 -2)📝
src/dsv41/ds4_gguf_cpu.cpp(+5 -1)📄 Description
Problem and result
strata-dsv41does not build with the stock compiler of RHEL / Alma / Rocky 9 (GCC 11.4.1, binutils 2.35.2):src/dsv41/ds4_gguf_cpu.cppturns its AVX-VNNI tier on from the compiler version alone (GCC 11 or newer). GCC 11accepts the AVX-VNNI intrinsics, but binutils older than 2.36 cannot assemble the VEX
vpdpbusd.After this change the file builds on that compiler without the AVX-VNNI tier. The AVX2, AVX-512 and AVX-512 VNNI
tiers stay. Where the compiler can build the tier, nothing changes.
Related discussion
None needed. This is a focused build fix. I searched for "AVX-VNNI", "vpdpbusd", "binutils", "Rocky 9",
"AlmaLinux" and "ds4_gguf_cpu" and found no issue or PR about this failure.
#4951 (an AVX-VNNI path for NVFP4 rows) edits the lines next to this one in
CMakeLists.txt, at the sameSTRATA_AVXVNNIproperty. Whichever PR lands second may need a one-line merge.Approach
CMake already checks whether the compiler can build AVX-VNNI:
STRATA_HAVE_AVXVNNI_INTRINSICS. That check failed inthis configure. CMake passes the answer to
q2_avx2.cppandiq_avx2.cppasSTRATA_AVXVNNI, but not tods4_gguf_cpu.cpp.CMakeLists.txtaddssrc/dsv41/ds4_gguf_cpu.cppto the sameset_property(... COMPILE_DEFINITIONS ${_strata_avxvnni}).ds4_gguf_cpu.cppturns onMX_AVXVNNIonly when the compiler is new enough and!defined(STRATA_AVXVNNI) || STRATA_AVXVNNI.metal/CMakeLists.txt) uses the compiler version, as before.Compatibility: where the check passes,
ds4_gguf_cpu.cpp.oand the linkedstrata-dsv41are byte-identical to thebuild before the change (below).
Validation
Environment:
a00cb1a1(this branch) onc62d5e3a(main)-G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_DSV41=ON -DSTRATA_NATIVE_EXPERTS=ON -DCMAKE_CUDA_ARCHITECTURES=native -DSTRATA_GGML_DIR=third_party/llama.cpp, targetstrata-dsv41Passed:
ds4_gguf_cpu.cpp.owith the error above(reproduced).
STRATA_HAVE_AVXVNNI_INTRINSICS - Failed, and the file gets-DSTRATA_AVXVNNI=0.nmshows nomx_avxvnni::symbols and 8mx_avx512vnni::symbols.strata-dsv41 --versionruns, andcuobjdumplistssm_80.-DSTRATA_AVXVNNI=1.ds4_gguf_cpu.cpp.oand the linkedstrata-dsv41are byte-identical to the build before the change (cmp).tests/dsv41/ds4_mx_bench.cpp, built by hand with GCC 11.4.1 against the changed file:g++ -O3 -std=c++20 -DSTRATA_AVXVNNI=0 -Iinclude tests/dsv41/ds4_mx_bench.cpp src/dsv41/ds4_gguf_cpu.cpp src/dsv41/vendor/exl3_cpu.cpp -lpthread--threads 1,8 --T 1,4,8 --experts 8 --secs 0.2scalar avx2 avx512 avx512vnni, and the measured pick isavx512vnni.Failed:
None observed.
Not run:
there.
/arch:AVX2, and it alreadydecides
q2_avx2.cppandiq_avx2.cppthere.the tier is unchanged.
Limits
q2_avx2.cppandiq_avx2.cppalready behave that way.gcc-toolset-12or newer, which brings newer binutils. This changemakes the stock compiler work too.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.