Skip to content

fix: update InfiniRT runtime API usage#787

Open
voltjia wants to merge 1 commit into
masterfrom
fix/infinirt-runtime-namespace
Open

fix: update InfiniRT runtime API usage#787
voltjia wants to merge 1 commit into
masterfrom
fix/infinirt-runtime-namespace

Conversation

@voltjia

@voltjia voltjia commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Update InfiniOps' InfiniRT aliases to use infini::rt::runtime::Runtime and DeviceRuntime.
  • Replace CUDA backend uses of MemcpyHostToDevice with kMemcpyHostToDevice.
  • Add the Hygon runtime traits required by the normalized InfiniRT runtime API shape.

Motivation

This is the companion change for InfiniTensor/InfiniRT#11. InfiniRT now keeps CUDA Runtime API-shaped symbols under infini::rt::runtime, and normalized memcpy-kind constants use the kMemcpy... spelling. InfiniOps needs this update to build against the new public headers.

Closes #

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)
  • Hygon
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Smoke Test Result

# accelerator-dev/nvidia:latest, with companion InfiniRT branch installed
python3 -m pip install /workspace/InfiniOps --no-build-isolation \
  --config-settings=cmake.define.INFINI_RT_ROOT=/workspace/infini-rt-prefix \
  --config-settings=cmake.define.AUTO_DETECT_BACKENDS=OFF \
  --config-settings=cmake.define.WITH_TORCH=OFF \
  --config-settings=cmake.define.WITH_CPU=ON \
  --config-settings=cmake.define.WITH_NVIDIA=ON

Successfully built InfiniOps
Successfully installed InfiniOps-0.1.0

python3 -m pip install /workspace/InfiniOps --no-build-isolation --no-deps --force-reinstall \
  --config-settings=cmake.define.INFINI_RT_ROOT=/workspace/infini-rt-prefix \
  --config-settings=cmake.define.AUTO_DETECT_BACKENDS=OFF \
  --config-settings=cmake.define.WITH_TORCH=ON \
  --config-settings=cmake.define.WITH_CPU=ON \
  --config-settings=cmake.define.WITH_NVIDIA=ON \
  --config-settings=cmake.define.INFINI_OPS_SMOKE_BUILD=ON \
  --config-settings=cmake.define.INFINI_OPS_TORCH_OPS=abs,clamp,exp

Successfully built InfiniOps
Successfully installed InfiniOps-0.1.0

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA yes smoke passed InfiniLM operator subset wheel built with companion InfiniRT branch; representative PyTorch wrapper smoke built for abs,clamp,exp.
Iluvatar no N/A Not touched.
MetaX no N/A Not touched.
Cambricon no N/A Not touched.
Moore no N/A Not touched.
Ascend no N/A Not touched.
Hygon yes not run Header-only runtime trait/name update; no Hygon hardware/toolkit in the validation environment.
Full `pytest` output (optional)
N/A

Benchmark / Performance Impact

N/A. This is an API compatibility update; no kernel implementation is changed.

Notes for Reviewers

  • This PR depends on feat!: align runtime API and add runtime dispatch InfiniRT#11. CI jobs that build against current InfiniRT master may fail until that dependency is merged or the CI dependency is overridden.`n- Full InfiniCore/InfiniLM inference validation was attempted, but the remote environment repeatedly failed while downloading the xmake Boost dependency from GitHub. The failure happened before InfiniCore compilation and was network-related.
  • The relevant compatibility checks for this PR passed: InfiniRT installed successfully, InfiniOps built against it, and representative PyTorch wrapper generation/build passed without doing the full wrapper set.

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