mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5120] [CLOSED] [Engine] cpu/experts: the 512-bit VNNI rows on a CPU without AVX-512-VBMI #5315
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#5315
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/5120
Author: @buserror
Created: 11/3/2026
Status: ❌ Closed
Base:
main← Head:pr/avx512-vnni-tier📝 Commits (1)
2775063cpu/experts: the 512-bit VNNI rows on a CPU without AVX-512-VBMI📊 Changes
6 files changed (+125 additions, -11 deletions)
View changed files
📝
include/strata/kernels/cpu/expert_layout.hpp(+10 -0)📝
src/kernels/cpu/expert.cpp(+49 -1)📝
src/kernels/cpu/expert_layout.cpp(+60 -4)📝
src/kernels/cpu/native_expert.cpp(+2 -2)📝
src/kernels/native_expert_parity.cpp(+2 -2)📝
src/program/generate.cpp(+2 -2)📄 Description
Problem and result
A Cascade Lake Xeon (AVX-512 F/BW/VL/DQ/VNNI, no VBMI) was treated as having no AVX-512 by
cpu_avx512_ok(), because that probe required every AVX-512 feature including VBMI. A native pack'sQ2_0 rows therefore used the AVX-2 fallback and the q8 activation quantizer its AVX-2 form, even
though only the q2 unpack's VPMULTISHIFTQB needs VBMI. After this change the same CPU selects the
512-bit VNNI rows and the q2 row dot, with a byte-for-byte substitute unpack for the multishift.
Related discussion
None: a focused ISA-usability fix. No default changes; the new tier only replaces a fallback.
Approach
cpu_vnni_ok()= AVX-512F + BW + VL + VNNI;cpu_vbmi_ok()= F + VL + VBMI;q2_rows_512_ok()says whether the q2 row dot may run (VNNI and not
STRATA_CPU_YMM=1).mask, four rounds in order, byte for byte the multishift's result.
STRATA_CPU_YMM=1stillselects the 256-bit rows, whose unpack keeps the multishift.
act_quant_anyusescpu_vnni_ok; the IQ-512 gate innative_expert.cppusescpu_avx512bw_ok(F/BW/VL/DQ), which is what those kernels need. The legacy/parity paths use thesame probe.
(EBX bit 30). Reading F for VBMI would have chosen the multishift on this CPU.
cpu_require_expert_support; this tier is fornative packs whose Q2_0 layers have an AVX-2 rung. No CUDA/HIP/SYCL path changed.
Validation
Passed:
cmake ... -DCMAKE_CUDA_ARCHITECTURES=70 ... && ninja -C build strataon this branch (52346f0b),2x V100-PCIE-32GB, CUDA 12.9, gcc-12: builds.
libstrata_kernels_cpu.aon the affected Cascade Lake prints:avx512_ok=0 avx512bw_ok=1 vnni_ok=1 vbmi_ok=0 q2_rows_512_ok=1.Failed:
Not run:
canonical refusal is intentionally unchanged. The linked probe is the direct check of the tier.
this machine (the CPU experts are a small share of the decode); no speed claim is made.
CPU is the regression check. A test that only restates the bit extraction would not cover hardware.
Limits
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.