feat(mars): add native Mars operator specializations - #942
Closed
Ceng23333 wants to merge 3 commits into
Closed
Conversation
Enable HPCC/Mars CMake detection, htcc compile wrapper, and device registration without Mars operator specializations.
Defer WITH_MARS torch host compilation to the smoke follow-up PR. Co-authored-by: Cursor <cursoragent@cursor.com>
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>
This was referenced Aug 24, 2026
Contributor
Author
|
Closing as already landed. This native-kernels layer shipped as part of the stack tip merge:
Do not merge this PR — it would be redundant with Related: InfiniRT HPCC Mars dtype fix also landed — InfiniTensor/InfiniRT#46 |
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
src/native/cuda/mars/(blas.h,blas_utils.h,caster.cuh,runtime_*.h,device_*.h,device_property.h).Operator<…, Device::Type::kMars>specializations undersrc/native/cuda/mars/ops/*/kernel.h, mirroringsrc/native/cuda/metax/and reusing sharedsrc/native/cuda/opskernels.src/native/cuda/mars/ops/gemm/hcblas.h.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 undersrc/native/cuda/ops.Depends on #941 (
feat/mars-platform-htcc).Type of Change
feat— new feature / new operator / new platformfix— bug fixperf— performance improvement (no behavioral change)refactor— code restructuring without behavior changetest— adding or fixing tests onlydocs— documentation onlybuild/ci— build system or CI configurationchore— tooling, formatting, or other non-code changes!in the Conventional Commits prefix or aBREAKING CHANGE:footer)Platforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Note: Mars / HPCC (
WITH_MARS) — native operator specializations only. Template has no Mars checkbox yet.Smoke Test Result
Requires #941 merged or stacked head. Host: MetaX X203 / HPCC.
Full
pytest -m smokeis on #943.Test Results on Supported Platforms
WITH_MARS)infiniops,INFINI_OPS_SMOKE_BUILD=ON)Full `pytest` output (optional)
Benchmark / Performance Impact
N/A
Notes for Reviewers
#includemetax (kMarsvskMetax).master.