Skip to content

Conversation

@JoeLin2333
Copy link

添加nvidia、metax、moore平台支持

Copy link

Copilot AI left a 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
Copy link

Copilot AI Jan 10, 2026

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'.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,171 @@
import torch
import ctypes
Copy link

Copilot AI Jan 10, 2026

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'.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,154 @@
import torch
import ctypes
Copy link

Copilot AI Jan 10, 2026

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'.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,156 @@
import torch
import ctypes
Copy link

Copilot AI Jan 10, 2026

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'.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,165 @@
import torch
import ctypes
Copy link

Copilot AI Jan 10, 2026

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'.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,154 @@
import torch
import ctypes
from ctypes import c_uint64, c_float, c_char_p
Copy link

Copilot AI Jan 10, 2026

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.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,156 @@
import torch
import ctypes
from ctypes import c_uint64, c_float, c_double
Copy link

Copilot AI Jan 10, 2026

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.

Copilot uses AI. Check for mistakes.
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.

1 participant