Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove inline assembly #4698

Closed
wants to merge 1 commit into from
Closed

Conversation

mstembera
Copy link
Contributor

I benched the AVX512, AVX2, and SSSE3 binaries compiled using gcc 13.1.0 Rev5 on Windows and measure no speed difference.
https://tests.stockfishchess.org/tests/view/64b0de3b0cdec37b957332e8
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 63520 W: 16218 L: 16030 D: 31272
Ptnml(0-2): 184, 7166, 16898, 7302, 210

No functional change
bench: 1556301

@Sopel97 What do u think?

No functional change
bench: 1556301
@vondele
Copy link
Member

vondele commented Jul 18, 2023

Did you have a look on godbolt testcase that is mentioned in the comment? https://godbolt.org/z/7EWqrYq51

For reference, our current pre-release binaries can be compiled with gcc 11 on Linux, and gcc 13 on windows (x86)

@cj5716
Copy link
Contributor

cj5716 commented Jul 18, 2023

I suggest benchmark on VNNI512 / AVXVNNI architectures also, given that the ASM benefits VNNI more.

@mstembera
Copy link
Contributor Author

mstembera commented Jul 19, 2023

@vondele I don't trust myself to read the godbolt assembly well enough to tell if it's optimal or not spilling registers. Which is why I ask for @Sopel97 opinion. I should also be able to test using gcc 11 (but on Windows) if it's useful to know. Are the compilers for the pre-release binaries the same as what fishtest uses?

@cj5716 I should be able to test VNNI512 but don't have access to AVXVNNI hardware. Where does the more benefit for VNNI information come from?

@cj5716
Copy link
Contributor

cj5716 commented Jul 19, 2023

@vondele I don't trust myself to read the godbolt assembly well enough to tell if it's optimal or not spilling registers. Which is why I ask for @Sopel97 opinion. I should also be able to test using gcc 11 (but on Windows) if it's useful to know. Are the compilers for the pre-release binaries the same as what fishtest uses?

@cj5716 I should be able to test VNNI512 but don't have access to AVXVNNI hardware. Where does the more benefit for VNNI information come from?

There is VNNI specific ASM in the code that has fewer instructions, which is why I think benchmarking on VNNI is important.

@Sopel97
Copy link
Member

Sopel97 commented Jul 19, 2023

I can't replicate any register spilling issues anymore, and I trust the test. Not sure what the representation for VNNI on fishtest is right now, probably could be benchmarked specifically here too.

@vondele
Copy link
Member

vondele commented Jul 19, 2023

@vondele I don't trust myself to read the godbolt assembly well enough to tell if it's optimal or not spilling registers. Which is why I ask for @Sopel97 opinion. I should also be able to test using gcc 11 (but on Windows) if it's useful to know. Are the compilers for the pre-release binaries the same as what fishtest uses?

fishtest uses what the users have installed, so it can be anything. For the pre-releases on github we have more control (yet certain limitations, not everything is available one every os).

@vondele vondele added the to be merged Will be merged shortly label Jul 19, 2023
@vondele vondele closed this in 1444837 Jul 19, 2023
Joachim26 pushed a commit to Joachim26/StockfishNPS that referenced this pull request Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be merged Will be merged shortly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants