-
Notifications
You must be signed in to change notification settings - Fork 95
Add three platform #907
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
base: main
Are you sure you want to change the base?
Add three platform #907
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for three hardware platforms (NVIDIA, MetaX, and Moore Threads) by implementing five new operators: atanh, addcmul, cdist, binary_cross_entropy_with_logits, and reciprocal. The changes include operator implementations for multiple backends (CPU, NVIDIA/CUDA, MetaX, Moore/MUSA), test files, and Python bindings.
Key changes:
- Implementation of 5 new operators across multiple hardware platforms
- Test infrastructure for infiniop and infinicore
- Python bindings and API registration
- Platform-specific kernel implementations for CUDA-like architectures
Reviewed changes
Copilot reviewed 114 out of 114 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/infiniop/*.py | Python test files for new operators (reciprocal, cdist, binary_cross_entropy_with_logits, atanh, addcmul) |
| test/infiniop/libinfiniop/op_register.py | Registration of new operators in the test framework |
| test/infinicore/ops/*.py | Uncommented infinicore operator implementations |
| src/infiniop/ops/*/operator.cc | Main operator dispatch logic for all platforms |
| src/infiniop/ops//nvidia/.cu(h) | NVIDIA/CUDA kernel implementations |
| src/infiniop/ops//metax/.maca | MetaX platform implementations |
| src/infiniop/ops//moore/.mu | Moore Threads (MUSA) implementations |
| src/infiniop/ops//cpu/.cc | CPU implementations |
| src/infiniop-test/src/ops/*.cpp | C++ test infrastructure |
| src/infinicore/* | InfiniCore operator implementations and Python bindings |
| python/infinicore/ops/*.py | Python wrapper for reciprocal operator |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,163 @@ | |||
| import torch | |||
| import ctypes | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module 'ctypes' is imported with both 'import' and 'import from'.
| @@ -0,0 +1,171 @@ | |||
| import torch | |||
| import ctypes | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module 'ctypes' is imported with both 'import' and 'import from'.
| @@ -0,0 +1,154 @@ | |||
| import torch | |||
| import ctypes | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module 'ctypes' is imported with both 'import' and 'import from'.
| @@ -0,0 +1,156 @@ | |||
| import torch | |||
| import ctypes | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module 'ctypes' is imported with both 'import' and 'import from'.
| @@ -0,0 +1,165 @@ | |||
| import torch | |||
| import ctypes | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module 'ctypes' is imported with both 'import' and 'import from'.
| @@ -0,0 +1,154 @@ | |||
| import torch | |||
| import ctypes | |||
| from ctypes import c_uint64, c_float, c_char_p | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'c_float' is not used.
| @@ -0,0 +1,156 @@ | |||
| import torch | |||
| import ctypes | |||
| from ctypes import c_uint64, c_float, c_double | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'c_float' is not used.
添加nvidia、metax、moore平台支持