Skip to content

revert!: restore explicit backend dtype includes - #58

Merged
baominghelly merged 1 commit into
masterfrom
revert/backend-dtype-includes
Nov 23, 2026
Merged

baominghelly merged 1 commit into
masterfrom
revert/backend-dtype-includes

Conversation

@baominghelly

Copy link
Copy Markdown
Contributor

Summary

Motivation

#55 made the shared runtime header pull in backend-specific dtype mappings. On Moore, ordinary C++ compilers then encountered the MUSA half type while parsing <infini/rt.h>. #56 switched that mapping to Float16, which resolved the runtime header build and caused existing InfiniOps Moore kernels to fail compilation when they used the mapping for native arithmetic.

Restoring explicit includes lets ordinary C++ consumers use the runtime header and lets MUSA kernel code obtain the native mapping from its backend header.

Type of Change

Platforms Affected

  • CPU (WITH_CPU)
  • NVIDIA (WITH_NVIDIA)
  • Iluvatar (WITH_ILUVATAR)
  • Hygon (WITH_HYGON)
  • MetaX (WITH_METAX)
  • Moore (WITH_MOORE)
  • Cambricon (WITH_CAMBRICON)
  • Ascend (WITH_ASCEND)
  • Other accelerator backends with generated dtype headers
  • Build system / generated headers
  • Public headers / installed consumer API

Smoke Build and Test Result

CPU build and CTest

cmake -S /work/InfiniRT-cpu -B /work/build-rt-cpu -G Ninja -DWITH_CPU=ON -DINFINI_RT_BUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/work/install/InfiniRT-cpu
cmake --build /work/build-rt-cpu --parallel 12
ctest --test-dir /work/build-rt-cpu --output-on-failure

All 11 tests passed, including test_install_consumer.

Moore build and install on MTT S5000 with MUSA 4.3.6

cmake -S /work/InfiniRT -B /work/build-rt -G Ninja -DWITH_CPU=ON -DWITH_MOORE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/work/install/InfiniRT
cmake --build /work/build-rt --parallel 16
cmake --install /work/build-rt

InfiniRT built and installed. A g++ probe compiled with <infini/rt.h>, and an mcc probe verified that explicitly including <infini/rt/moore/data_type_.h> maps FP16 to half. The installed InfiniRT was used to build and install unmodified InfiniOps d854a96b in both the full native (mp_31) and smoke configurations with Python bindings.

Downstream CPU pytest smoke from the Moore-enabled build

python3 -m pytest -q tests/ -m smoke --devices cpu

129 passed, 48 skipped, 0 failed.

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
CPU Yes Build and CTest passed 11/11 including installed consumer. Downstream CPU smoke passed.
Moore Yes Build, install, and header probes passed InfiniOps full native and Python smoke builds passed. GPU pytest was not run.
Iluvatar Yes Not run Development SSH connection closed during access checks.
NVIDIA Yes Not run No device validation in this change.
Hygon Yes Not run No device validation in this change.
MetaX Yes Not run No device validation in this change.
Cambricon Yes Not run No device validation in this change.
Ascend Yes Not run No device validation in this change.
Other enabled backends Yes Not run Shared header generation reverts to the same pre-#55 source.

Benchmark / Performance Impact

N/A. Header generation and dtype mapping only.

Notes for Reviewers

Source files that instantiate backend-specific FP16 or BF16 TypeMapType specializations should include <infini/rt/<backend>/data_type_.h> in the translation unit that uses them. Please review downstream include coverage, especially on Iluvatar.

Revert InfiniRT #55 and #56. Restore the generated public headers and Moore FP16 mapping to their state before those changes.
@baominghelly
baominghelly merged commit ce63347 into master Nov 23, 2026
6 checks passed
@baominghelly
baominghelly deleted the revert/backend-dtype-includes branch November 23, 2026 08:56
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