Skip to content

[RFC] remove non-VECTOR code path in nnue_accumulator.cpp - #7014

Draft
ces42 wants to merge 3 commits into
official-stockfish:masterfrom
ces42:accum-simp2
Draft

[RFC] remove non-VECTOR code path in nnue_accumulator.cpp#7014
ces42 wants to merge 3 commits into
official-stockfish:masterfrom
ces42:accum-simp2

Conversation

@ces42

@ces42 ces42 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

this is a PR on top of #7013.
This might be a slight slowdown for binaries without vectorization. E.g. x86-32 running on Redwood Cove:

Result of 80 runs (counting nodes/1B cycles)
=============================================
base (...ckfish.mmx.orig) =   37369 +/- 1136
test (...sh.mmx.tile1024) =   37039 +/- 1109
speedup %                 =   -0.85 +/- 0.08
                             [95% CI; t-test]

likelihood(speedup > 0)   =  0.0000

CPU: 16 x Intel(R) Core(TM) Ultra 9 185H

Should result in exactly the same code after pre-processing for any uarch that has defined(VECTOR) || defined(USE_RVV).

No functional change

@github-actions

Copy link
Copy Markdown

clang-format 20 needs to be run on this PR.
If you do not have clang-format installed, the maintainer will run it when merging.
For the exact version please see https://packages.ubuntu.com/questing/clang-format-20.
An easier way to install it might be through https://apt.llvm.org/#llvmsh.

(execution 30462432105 / attempt 1)

@ces42
ces42 marked this pull request as draft July 29, 2026 14:45
@ces42

ces42 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

(this is currently broken on RISC-V)

@anematode

Copy link
Copy Markdown
Member

I think this is good, the non-vector impls should just be there for correctness purposes

@Torom

Torom commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

base: #7013 test: #7014

sf_base =    2259612 +/-    1863 (95%)
sf_test =    2259660 +/-    1820 (95%)
diff    =         47 +/-    2622 (95%)
speedup =   0.00211% +/-  0.116% (95%)

Probability candidate is faster than baseline by at least
   0.00%:  51.42%
   0.25%:   0.00%
   0.50%:   0.00%
   1.00%:   0.00%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants