Repository navigation
Reduce native inference time on i7-7700T with per-model optimizations - #21
Merged
danielr55 merged 5 commits intoNov 6, 2026
Merged
Conversation
Add guarded depthwise, concurrency, CPU-mask and every-hop stream checks. Preserve raw timing evidence and provide paired statistical/profiling tools. Propagate GCC profiling linkage to static consumers during PGO generation.
Replace stride-three gathers with bounded loads/permutations and enable the accepted AVX2/FMA graph code generation with no-math-errno.
Reuse fused AVX2 batch calculations, write recurrent state directly and align only model 8 branches. Preserve the accepted VNNI object code and runtime dispatch; remove unused production experiment switches.
Record independent per-model and factor confirmation, power-policy follow-up, exact correctness checks and compiler coverage. Publish all paired block observations and retain explicit VNNI/historical-corpus limitations.
Build and run every contract in GENERATE mode, including linking kernel benchmark executables, before training fresh separate shared/static PGO releases. Add the static PGO matrix entry and retain CMake/CTest logs as workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduce neural-call processing time at a 10 ms cadence on an Intel Core i7-7700T, with independently selected implementations for each model. Target
ceva-ip/DPDFNet:optimized-inference(baselineafa8292), which contains the native runtime.Replace stride-3 depthwise gathers with bounded loads/permutations and enable AVX2/FMA graph code generation. Model 8 additionally reuses the existing fused AVX2 batch kernel, writes recurrent state directly, and aligns branches. Retain the AVX2/FMA baseline, optional AVX-VNNI dispatch, unchanged weights/ABI and libc/libm-only runtime dependencies. Fix static PGO-generation linkage. Remove unused production experiment switches.
Independent held-out confirmation under performance governor/EPP, original frequency bounds, 36 mirrored randomized blocks per model, two fresh processes per variant/block, 120 warmup and 500 timed hops/process:
Both CPU 2 and its HT sibling CPU 6 were reserved; workers ran only on CPU 2 and ordinary processes were excluded from both. All observations and identical-binary controls are retained. Each retained factor has a separately confirmed conditional contribution; V groups graph targeting with
-fno-math-errno; B groups AVX2 batch fusion withquantize64. Their internal edits were not separately isolated. p99 improved and no timed calls or completions exceeded the 10 ms deadline. These are neural-call measurements, not an end-to-end latency or cross-CPU speedup claim.The separate 36-block original-power follow-up confirms model 2 (+5.142%, interval [2.556%, 7.658%]); model 8 remains inconclusive (+1.508%, interval [-1.240%, 4.181%]). The evidence retains the original short guard and the post-plan follow-up, including the permutation-resolution limitation and unchanged family-40 correction.
Validation:
Portable results and per-factor intervals:
optimized_inference/validation/i7_7700t_final.json. All 57 contrasts, including the initial failed control, are published as paired block observations inoptimized_inference/validation/i7_7700t_blocks.json(orders, log ratios, analysis seeds and source hashes); their t intervals were independently reconstructed before publication. Methods and scope:optimized_inference/docs/PERFORMANCE.md. Full per-hop samples, infrastructure journals and the HTML report are retained in the local evidence archive.CI coverage in this PR:
Verified CI results for published head
30899a72736bff5bf0616886b58f54f89c24acbb:All five jobs passed in the upstream PR workflow, and all five passed independently in the fork push workflow. Both workflows used GCC 11.4.0 on Ubuntu 22.04. Every job log was inspected; neither PGO phase produced a linker failure.
Skips are the six direct VNNI contracts on hosts without the required instruction. Both shared/static PGO configurations executed those contracts successfully in GENERATE and release builds, and the fork sanitizer job executed them too. There were no test failures. Each workflow retained five configuration/CTest log artifacts for 14 days. The PR check rollup is successful for this exact head.