Skip to content

feat(mars): add native Mars operator specializations - #2

Closed
Ceng23333 wants to merge 1 commit into
feat/mars-platform-htccfrom
feat/mars-native-kernels
Closed

Ceng23333 wants to merge 1 commit into
feat/mars-platform-htccfrom
feat/mars-native-kernels

Conversation

@Ceng23333

@Ceng23333 Ceng23333 commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

Motivation

Isolate Mars kernel / operator review from platform toolchain and torch bindings. Layout policy matches MetaX: vendor tree under src/native/cuda/mars/, shared CUDA ops under src/native/cuda/ops.

Depends on InfiniTensor#941 (feat/mars-platform-htcc).

Type of Change

  • feat — new feature / new operator / new platform
  • fix — bug fix
  • perf — performance improvement (no behavioral change)
  • refactor — code restructuring without behavior change
  • test — adding or fixing tests only
  • docs — documentation only
  • build / ci — build system or CI configuration
  • chore — tooling, formatting, or other non-code changes
  • Breaking change (requires a ! in the Conventional Commits prefix or a BREAKING CHANGE: footer)

Platforms Affected

  • CPU (WITH_CPU)
  • NVIDIA (WITH_NVIDIA)
  • Iluvatar (WITH_ILUVATAR)
  • MetaX (WITH_METAX)
  • Cambricon (WITH_CAMBRICON)
  • Moore (WITH_MOORE)
  • Ascend (WITH_ASCEND)
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Note: Mars / HPCC (WITH_MARS) — native operator specializations only. Template has no Mars checkbox yet.

Smoke Test Result

Requires InfiniTensor#941 merged or stacked head. Host: MetaX X203 / HPCC.

cmake -S . -B build-mars-smoke \
  -DWITH_CPU=ON -DWITH_MARS=ON \
  -DAUTO_DETECT_DEVICES=OFF -DAUTO_DETECT_BACKENDS=OFF \
  -DGENERATE_PYTHON_BINDINGS=OFF \
  -DINFINI_OPS_SMOKE_BUILD=ON \
  -DINFINI_RT_ROOT=<mars-rt-prefix> \
  -DCMAKE_BUILD_TYPE=Release
cmake --build build-mars-smoke --target infiniops --parallel $(nproc)
# Built target infiniops (Mars Operator<…, kMars> specializations linked)

Full pytest -m smoke is on InfiniTensor#943.

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA no N/A - not affected
Iluvatar no N/A - not affected
MetaX no N/A - not affected
Cambricon no N/A - not affected
Moore no N/A - not affected
Ascend no N/A - not affected
Mars/HPCC (WITH_MARS) yes library smoke build passed (infiniops, INFINI_OPS_SMOKE_BUILD=ON) Pytest smoke on InfiniTensor#943. Smoke allowlist ops without Mars ports (e.g. cast/cat/linear/matmul) remain skip-until-ported.
Full `pytest` output (optional)
N/A — pytest smoke is on stack tip #943.

Benchmark / Performance Impact

N/A

Notes for Reviewers

Thin Operator<…, kMars> wrappers under src/native/cuda/mars/ mirroring
metax, reusing shared native/cuda/ops kernels plus HCBLAS gemm glue.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Ceng23333

Copy link
Copy Markdown
Owner Author

@Ceng23333 Ceng23333 closed this Aug 24, 2026
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