Skip to content

docs: add public API documentation#16

Merged
voltjia merged 3 commits into
masterfrom
docs/public-api-docs
Jul 6, 2026
Merged

docs: add public API documentation#16
voltjia merged 3 commits into
masterfrom
docs/public-api-docs

Conversation

@voltjia

@voltjia voltjia commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add public user documentation for README.md, docs/README.md, docs/build.md, docs/api/runtime.md, docs/api/core-types.md, docs/backends.md, and docs/compatibility.md.
  • Add runtime usage examples under examples/, including a minimal installed-consumer CMake project.
  • Add the INFINI_RT_BUILD_DOCS CMake option and infinirt_docs Doxygen target.
  • Document how to preview the generated Doxygen HTML structure locally.

Motivation

InfiniRT now has a public runtime surface, but users need a documented entry point, build instructions, example consumers, and a generated API reference path. This PR establishes that documentation baseline while keeping GitHub Pages integration out of scope for a follow-up PR.

Closes N/A.

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

Smoke Test Result

Markdown relative link check:
Markdown relative links OK

ssh nvidia, clang-format 14:
clang-format --dry-run --Werror \
  examples/basic_runtime.cc \
  examples/select_backend.cc \
  examples/tensor_view.cc \
  examples/consumer_cmake/main.cc
Result: passed

ssh nvidia, Doxygen reference generation:
docker run --rm -v <source>:/workspace -w /workspace \
  accelerator-dev/nvidia:doxygen \
  cmake -S . -B build -DWITH_CPU=ON -DINFINI_RT_BUILD_DOCS=ON
Result: configuring done, Doxygen 1.9.8 found

docker run --rm -v <source>:/workspace -w /workspace \
  accelerator-dev/nvidia:doxygen \
  cmake --build build --target infinirt_docs
Result: Built target infinirt_docs

Generated HTML check:
build/docs/reference/html/index.html exists
index.html contains: Runtime API for Accelerators

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA No N/A - docs only; Doxygen validation ran on ssh nvidia N/A - not affected
Iluvatar No N/A - not affected N/A - not affected
MetaX No N/A - not affected N/A - not affected
Cambricon No N/A - not affected N/A - not affected
Moore No N/A - not affected N/A - not affected
Ascend No N/A - not affected N/A - not affected
Full `pytest` output (optional)
N/A - no pytest suite was run because this PR only adds documentation, examples, and the Doxygen documentation target.

Benchmark / Performance Impact

N/A - this PR is not performance-sensitive.

Notes for Reviewers

  • GitHub Pages integration is intentionally left for a follow-up PR.
  • The generated API reference is scoped to public entry headers, core public headers, and generated dispatching runtime declarations.
  • examples/.clang-format inherits the repository style and only classifies <infini/...> includes as third-party headers for example code formatting.

@voltjia voltjia changed the title Add public API documentation docs: add public API documentation Jul 6, 2026
@voltjia voltjia force-pushed the docs/public-api-docs branch from 747cd57 to c31eeed Compare July 6, 2026 08:35
@voltjia voltjia requested a review from Ziminli July 6, 2026 08:38
@voltjia voltjia merged commit 11abe5e into master Jul 6, 2026
4 checks passed
@voltjia voltjia deleted the docs/public-api-docs branch July 6, 2026 09:42
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.

2 participants