Repository navigation
Conversation
Keep AVX2/FMA compatibility and the public API unchanged. Isolate VEX VNNI kernels, derive assembly from existing sources, and validate exact numerical output and guarded memory boundaries for both models.
Keep the VNNI feature probe nonconstant so it exercises instruction emission, and quote the test-only forced include when the source path contains spaces. Both dispatch and guarded fused contracts pass from a source directory containing a space.
There was a problem hiding this comment.
Requesting one build fix before approval. The core dispatch implementation and integer-equivalence argument look sound from source review.
- Fix PGO linking for the new model-8 VNNI tests. In
optimized_inference/CMakeLists.txtaround lines 160-168, the new test executables includebackend8object files directly but only linkm. WithDPDF_PGO_MODE=GENERATEandBUILD_TESTING=ON, those objects are instrumented with-fprofile-generate, so omitting that option at link time is expected to leave__gcov_*runtime references unresolved. Please apply the same conditional already used by the existing model-8 contract targets:
if(DPDF_PGO_MODE STREQUAL "GENERATE" AND size EQUAL 8)
target_link_options(${target} PRIVATE -fprofile-generate=${DPDF_PROFILE_DIR})
endif()Please verify this configuration on a GCC toolchain that passes the VNNI compiler probe:
cmake -S optimized_inference -B build/pr20-pgo-generate -DDPDF_PGO_MODE=GENERATE -DBUILD_TESTING=ON -DDPDF_ENABLE_AVX_VNNI=ON
cmake --build build/pr20-pgo-generate --parallel 2 --target model8_fused_contract_vnni model8_pair_contract_vnniThis finding comes from source inspection; the link failure was not reproduced in a native build environment. The recommended build driver disables tests during profile generation, so its successful CI run does not cover this combination. GCC requires the profile-generation flag during both compilation and linking: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-generate
-
Validate the revised commit. Please rerun the shared PGO, static, explicit AVX2 fallback, and ASan/UBSan configurations after the fix. The upstream workflow also needs maintainer authorization before it can provide the PR's CI result.
-
Provide reproducible VNNI execution evidence. Please include commands and execution output for both dispatch contracts and all six direct VNNI assembly contracts on a VNNI-capable CPU. The fork CI logs confirm that the six direct VNNI tests were skipped. The reported local results are useful; reproducible execution output would make the new path easier to verify.
Quantized inference currently uses AVX2 multiply/add reductions even on CPUs with AVX-VNNI. This adds automatic, initialization-time selection of VEX-encoded
VPDPBUSDkernels while retaining the same AVX2/FMA baseline, weights, quantization, floating-point instruction order, and seven-symbol public ABI.This targets
optimized-inference, which contains the maintained native runtime, rather than the Python-only default branch.Implementation
DPDF_ENABLE_AVX_VNNI=OFF.Validation
Performance on Intel Core i7-1255U
GCC 16.2.1, Linux, powersave governor, one P core (logical CPU 2), identical deterministic synthetic spectra, 120 warm-up hops and 1,000 timed hops/fresh process. Alternate AB/BA ordering; eight runs/variant for continuous mode and four for 10 ms paced mode. Both builds use fresh independent PGO profiles; compilation and sanitizer checks completed before measurement. Values are mean ± SD of run means, in ms/hop.
Neither variant exceeded 10 ms in these runs. These are target-specific performance results, not a universal speedup or an end-to-end audio quality benchmark. Raw runs, fixture hashes and validation conditions are included in
optimized_inference/validation/avx_vnni_alder_lake.json.Baseline:
5d497fd9452225fff4bddb122c0595de4840aa6f. Existing public release measurements remain explicitly identified as historical AVX2 references.CI
All four native CI configurations passed in the fork on this commit: shared PGO, static, explicit AVX2 fallback, and ASan/UBSan, using Ubuntu 22.04's GCC. The compiler VNNI check succeeds; the six direct VNNI assembly tests correctly skip on the runner's CPU without that feature. They all execute and pass on the local AVX-VNNI host. The upstream PR workflow currently awaits first-contributor approval. A source-directory path containing a space was also tested: the VNNI compiler/assembler probe, guarded fused oracle, and 256-case dispatch contract all pass.