refactor: consume InfiniRT runtime headers#644
Draft
spike-zhu wants to merge 2 commits into
Draft
Conversation
voltjia
requested changes
Jun 5, 2026
c190413 to
df19e5d
Compare
df19e5d to
ec1e978
Compare
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
<infini/rt.h>and generated<infini/rt/<backend>/...>wrappers.INFINIRT_SOURCE_DIRtoINFINI_RT_SOURCE_DIRand remove the old globalsrcinclude pollution before adding InfiniRT.includeandgenerated/include, instead of depending on InfiniRT root-levelsrcheaders.Motivation
This updates the existing InfiniOps runtime migration to match the current InfiniOps and InfiniRT layout. The related InfiniRT prerequisite is InfiniTensor/InfiniRT#4, which scopes installed InfiniRT headers under
<infini/rt.h>/infini/rt/detail/...so installed InfiniOps consumers are not polluted by InfiniRT root-leveldevice.h,runtime.h,data_type.h, orhash.h.No linked issue.
Type of Change
fix– Bug fix (non-breaking change that fixes an issue)feat– New feature (non-breaking change that adds functionality)breaking– Breaking change (fix or feature that would cause existing functionality to not work as expected)docs– Documentation updatebuild/ci– Build system or CI changesperf– Performance improvementtest– Test-only changesrefactor– Code refactoring without behavior changechore– Maintenance / cleanupPlatforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)Smoke Test Result
InfiniOps CPU:
cmake -S . -B build-cpu -DWITH_CPU=ON -DCMAKE_BUILD_TYPE=Release cmake --build build-cpu -j2Result: build passed, including examples.
Install consumer smoke:
Result: compiled and ran successfully with only installed headers, including both
<infini/ops.h>and<infini/rt.h>.InfiniOps NVIDIA:
cmake -S . -B build-nvidia -DWITH_NVIDIA=ON -DCMAKE_BUILD_TYPE=Release cmake --build build-nvidia -j2Result: build passed, including examples. The build emitted existing third-party/backend warnings but exited successfully.
Python formatting:
Result: passed.
C++ formatting: not run because
clang-format/ versionedclang-format-*is not installed in the available local or remote images.Test Results on Supported Platforms
Benchmark / Performance Impact
No performance impact expected. This PR changes runtime integration, include boundaries, and code generation inputs; it does not change operator kernels or dispatch algorithms.
Notes for Reviewers
Please review this together with InfiniTensor/InfiniRT#4. The important boundary is that InfiniOps should consume InfiniRT through public/installable headers and should not require users to add InfiniRT
src/native/...paths to their include search path.