🦈 IMP: LLVM 20, Minor Assembly Optimizations, MantaRay 2, Python Bindings#45
Merged
TheBlackPlague merged 184 commits intomasterfrom May 13, 2025
Merged
🦈 IMP: LLVM 20, Minor Assembly Optimizations, MantaRay 2, Python Bindings#45TheBlackPlague merged 184 commits intomasterfrom
TheBlackPlague merged 184 commits intomasterfrom
Conversation
- Update Thread Pool - Fix UCI errors - Remove duplicate code in entry fx.
UCI options should be updated in my opinion to reflect a minimum thread count of 2 (UCI Input Thread + Search Thread).
Apparently the compiler was zero initializing the score. Bad compiler. Bench: 7025779
In other cases, use [[clang::always_inline]] and [[clang::no_inline]]. Bench: 7025779
Bench: 7025779
Bench: 7025779
Bench: 7025779
There was a problem hiding this comment.
Pull Request Overview
This PR updates the codebase to support Python bindings while upgrading the LLVM requirement to version 20. Key changes include refactoring the AttackTable namespace and static data definitions, modernizing the Board class implementation with newer C++ features and improved castling logic, and updating build scripts and CI workflows for better cross‐platform support and PGO builds.
Reviewed Changes
Copilot reviewed 55 out of 65 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Backend/Move/AttackTable.h | Refactored namespace and removed unused includes and code sections. |
| src/Backend/Misc.h | Added a utility function for hexadecimal conversion. |
| src/Backend/Board.h | Modernized constructors and methods, updated castling and move logic. |
| pyproject.toml | Introduced configuration for Python bindings using Pybind11. |
| README.md | Updated LLVM version requirement and minor documentation tweaks. |
| Makefile | Enhanced build targets with improved profiling and cross-platform flags. |
| Information.cmake | Updated author string for consistency. |
| CMakeLists.txt | Revised C++ standard and options to support Python module building. |
| .github/workflows/*.yml | Updated workflows to use Clang 20 and expanded build matrix configurations. |
Files not reviewed (10)
- .idea/.name: Language not supported
- .idea/codeStyles/Project.xml: Language not supported
- .idea/codeStyles/codeStyleConfig.xml: Language not supported
- .idea/deployment.xml: Language not supported
- .idea/editor.xml: Language not supported
- .idea/fileTemplates/internal/C Header File.h: Language not supported
- .idea/fileTemplates/internal/C++ Class Header.h: Language not supported
- .idea/inspectionProfiles/Project_Default.xml: Language not supported
- .idea/misc.xml: Language not supported
- .idea/vcs.xml: Language not supported
Comments suppressed due to low confidence (1)
src/Backend/Board.h:128
- [nitpick] The debug output to std::cout may be inappropriate in production; consider removing it or replacing it with a proper error logging mechanism or assertion.
if (piece == NAP) std::cout << "ERROR" << std::endl;
Bench: 7025779
Bench: 7025779
Bench: 7025779
…ulated Thread Pool. Bench: 7025779
Bench: 7025779
Bench: 7025779
Bench: 7025779
Bench: 7025779
Bench: 7025779
Bench: 7025779
Bench: 7025779
Bench: 7025779
Bench: 7025779
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.
🎯 Summary
This PR does the following:
inlinedecorative from most places and resolves to rely on compiler inlining choices. In some instances, guaranteed inlining is still wanted, and in those situations,[[clang::always_inline]]is used.All of the above lead to considerable performance improvements.
In addition, StockDory now provides Python Bindings as an ease-of-use addition. These Python Bindings are largely unfinished in their current state and will be subject to change until engine version 1.0, but they should help those interested in using the engine from Python. Performance issues will be monitored.
As a side note, workflows are refactored into more modern versions and support mainstream Apple Desktop chips.
👏 Acknowledgements
NA
📈 ELO
STC:
LTC: