Skip to content

fix(mars): use HPCC bfloat/fp16 headers instead of MACA - #46

Merged
voltjia merged 1 commit into
InfiniTensor:masterfrom
Ceng23333:fix/mars-hpcc-types
Aug 24, 2026
Merged

fix(mars): use HPCC bfloat/fp16 headers instead of MACA#46
voltjia merged 1 commit into
InfiniTensor:masterfrom
Ceng23333:fix/mars-hpcc-types

Conversation

@Ceng23333

Copy link
Copy Markdown
Contributor

Summary

  • Switch Mars dtype headers in src/native/cuda/mars/data_type_.h from MACA (maca_bfloat16.h, maca_fp16.h, __maca_bfloat16) to HPCC (hpcc_bfloat16.h, hpcc_fp16.h, __hpcc_bfloat16).
  • Add cuda_bfloat16 / cuda_bfloat162 aliases to the HPCC bfloat types for Mars.

Motivation

Mars/HPCC builds link the HPCC toolkit, not MACA. The Mars backend landed on master with MetaX-style MACA half/bfloat headers; that breaks or mis-types Mars builds that compile against /opt/hpcc includes. This aligns Mars TypeMap with the actual vendor headers.

Related InfiniOps Mars stack (platform/kernels/smoke): InfiniTensor/InfiniOps#941–#943.

Type of Change

  • feat - new feature / new backend capability / new public API
  • fix - bug fix
  • perf - performance improvement without behavior 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)
  • Hygon (WITH_HYGON)
  • MetaX (WITH_METAX)
  • Moore (WITH_MOORE)
  • Cambricon (WITH_CAMBRICON)
  • Ascend (WITH_ASCEND)
  • Build system / CMake / generated headers
  • Public headers / installed consumer API
  • Documentation only

Note: Mars / HPCC (WITH_MARS) — Mars dtype header fix only.

Smoke Build and Test Result

Host: MetaX X203 / HPCC (Mars integration prefix).

cmake -S . -B build-mars-rt \
-DWITH_CPU=ON -DWITH_MARS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/tmp/infinirt-mars-prefix
cmake --build build-mars-rt -j$(nproc)
cmake --install build-mars-rt
# Built and installed libinfinirt with Mars backend

Test Results on Supported Platforms

PlatformAffectedBuild / Smoke ResultFull Result / Notes
CPUnoN/A - not affected
NVIDIAnoN/A - not affected
IluvatarnoN/A - not affected
HygonnoN/A - not affected
MetaXnoN/A - not affected
MoorenoN/A - not affected
CambriconnoN/A - not affected
AscendnoN/A - not affected
Mars/HPCC (WITH_MARS)yessmoke build passed (WITH_MARS=ON)Used in InfiniLM Mars integration prefix consumed by InfiniOps Mars smoke.
Full `ctest` output (optional)
N/A — Mars-only header fix; no new ctest cases in this PR.

Benchmark / Performance Impact

N/A

Notes for Reviewers

Mars links the HPCC toolkit, so TypeMap must include hpcc_bfloat16.h
and alias cuda_bfloat16 to __hpcc_bfloat16.
@Ceng23333
Ceng23333 requested a review from voltjiaAugust 24, 2026 02:42
@voltjia
voltjia merged commit 6b256e0 into InfiniTensor:masterAug 24, 2026
4 checks passed
Sign up for freeto 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

@Ceng23333@voltjia