Skip to content

fix: scope InfiniRT public install headers#5

Merged
voltjia merged 1 commit into
masterfrom
fix/public-install-header-boundary
Jun 17, 2026
Merged

fix: scope InfiniRT public install headers#5
voltjia merged 1 commit into
masterfrom
fix/public-install-header-boundary

Conversation

@voltjia

@voltjia voltjia commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Generate InfiniRT public detail headers under infini/rt/detail/....
  • Make generated public wrappers include only infini/rt/... paths instead of root-level short headers.
  • Stop installing src/*.h, src/common, and src/native into the install include root.

Motivation

InfiniOps consumes InfiniRT from the same install prefix. InfiniRT previously installed root-level headers such as device.h, runtime.h, data_type.h, and hash.h, which could collide with InfiniOps legacy public headers and break installed consumers of <infini/rt.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 update
  • build / ci – Build system or CI changes
  • perf – Performance improvement
  • test – Test-only changes
  • refactor – Code refactoring without behavior change
  • chore – Maintenance / cleanup

Platforms Affected

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

Smoke Test Result

InfiniRT CPU:

cmake -S . -B build-cpu -DWITH_CPU=ON -DINFINI_RT_BUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build-cpu -j2
ctest --test-dir build-cpu --output-on-failure

Result: passed, 6/6 tests.

Install header boundary:

cmake --install build-cpu --prefix /work/infinirt-install-cpu

Result: verified the install prefix has no root-level InfiniRT data_type.h, device.h, runtime.h, or hash.h; install consumer including only <infini/rt.h> passed.

InfiniRT NVIDIA:

cmake -S . -B build-nvidia -DWITH_NVIDIA=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build-nvidia -j2

Result: build passed.

Python formatting:

ruff check scripts/generate_public_headers.py
ruff format --check scripts/generate_public_headers.py

Result: passed.

C++ formatting: not run because clang-format / versioned clang-format-* is not installed in the available local or remote images.

Test Results on Supported Platforms

Platform Affected Result Notes
NVIDIA Yes Build passed Runtime smoke not run; validation was compile/install-header focused.
Iluvatar Yes Not run Generated public wrapper include paths are affected; platform validation can follow separately.
MetaX Yes Not run Generated public wrapper include paths are affected; platform validation can follow separately.
Cambricon Yes Not run Generated public wrapper include paths are affected; platform validation can follow separately.
Moore Threads Yes Not run Generated public wrapper include paths are affected; platform validation can follow separately.
Ascend Yes Not run Generated public wrapper include paths are affected; platform validation can follow separately.

Benchmark / Performance Impact

No runtime performance impact expected. This change only adjusts generated public include layout and install rules.

Notes for Reviewers

This replaces the closed #4 with a dedicated branch name so it is no longer sharing the former PR #3 branch. It is intended as the InfiniRT prerequisite for migrating InfiniOps to consume installed InfiniRT headers cleanly. The key thing to review is whether the generated public mirror under infini/rt/detail/... contains every header needed by installed consumers without exposing src/native/... or root-level short header names.

@voltjia voltjia force-pushed the fix/public-install-header-boundary branch from ef109bc to dbc1ae0 Compare June 17, 2026 09:36
@voltjia voltjia marked this pull request as ready for review June 17, 2026 13:09
@voltjia voltjia merged commit 4a39bc7 into master Jun 17, 2026
4 checks passed
@voltjia voltjia deleted the fix/public-install-header-boundary branch June 17, 2026 13:12
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