feat(metax): add graph capture and replay support#31
Open
gongchensu wants to merge 5 commits into
Open
Conversation
Distinguish HPCC and MACA SDK signals during automatic backend selection. Reject ambiguous hosts unless WITH_MARS or WITH_METAX is selected explicitly, while preserving PCI fallback when neither SDK is present. Expose Mars through installed package consumer metadata, document the device selection rules, and cover dual-SDK detection with a CMake regression test.
voltjia
requested changes
Jul 24, 2026
voltjia
left a comment
Collaborator
There was a problem hiding this comment.
这个 PR 最好是拆成两个,一个专门适配 MetaX 的,另一个是添加 Mars 的。然后我看原先沐曦的内容是在 cuda 下面,现在都被移动到了 maca 下面,而且添加了新的 runtime_.h,目前先不这么做,之前是特地把所有类 CUDA 平台都放到了 cuda 下面,所以按理说应该也不用添加新的 runtime_.h,这一点对于 Mars 应该也一样,否则要是按这么说的话,摩尔也得挪到 musa 下面了。除此之外,我看代码中有不少 ”ambiguous“ 字眼,说是 MetaX 和 Mars 互相分不清,其实恰恰是分的很清楚,所以咱们才完全拆开,所以按理说不需要类似的内容。还有些格式化的内容,原本存在的一些空行啥的我看给删了,这种改动非必要的话都先不做,保证 PR 的小化。
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/metax/runtime_.h.GraphRuntimeimplementation and adapt the five-argumentmcGraphInstantiatesignature.tests/CMakeLists.txtand updatedocs/backends.md.Motivation
MetaX MC runtime provides stream capture and graph execution APIs, but InfiniRT did not expose them through its graph runtime abstraction. This prevented downstream users such as InfiniCore and InfiniLM from using the InfiniRT graph capture and replay path on MetaX devices.
Related issue: N/A - this change is not associated with an existing issue.
Type of Change
feat- new feature / new backend capability / new public APIfix- bug fixperf- performance improvement without behavior changerefactor- 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_HYGON)WITH_METAX)WITH_MOORE)WITH_CAMBRICON)WITH_ASCEND)Smoke Build and Test Result
Test Results on Supported Platforms
Full `ctest` output (optional)
Benchmark / Performance Impact
Notes for Reviewers