refactor: adapt dispatcher for full C++17 compatibility and support pip install on MetaX#5
Merged
voltjia merged 9 commits intofeat/dev-infrafrom Mar 5, 2026
Merged
Conversation
voltjia
requested changes
Feb 28, 2026
87bd2c0 to
1740234
Compare
pip install
pip installpip install on MetaX
- dispatcher now does not depend on C++20 features - udpate the current dispatcher use cases - add some relevant constexpr traits in common/traits.h - add `PYBIND_ENABLE_EXTRAS` internal cmake variable for controlling the flags introduced by pybind
…, `common/constexpr_map.h` and `dispatcher.h`
333df36 to
909a7c6
Compare
…ace `detail` to comply with the styling rules
909a7c6 to
4606681
Compare
voltjia
requested changes
Mar 5, 2026
9a9cb4b to
2807c28
Compare
voltjia
approved these changes
Mar 5, 2026
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.
TL;DR: Refactors the dispatcher to remove C++20-specific features and ensure full C++17 compatibility, and support
pip install .[dev]on MetaX.Key Changes
Dispatcher Refactor:
Support Pytest on MetaX:
mxcc) does not support. By adding a wrapper script, it processes the flags and makepip installwork.Support Auto-detection on MetaX:
InfiniOpscan just dopip install .[dev]instead ofpip install .[dev] -C cmake.define.WITH_CPU="ON" -C cmake.define.WITH_METAX="ON".Fix Styling Issues:
common/traits.h,common/constexpr_map.h,src/dispatcher.handcpu/add/add.h.Known Issues & Future Work: