From fc4a3a87ced1c7604a0937ceff7c660fb3020933 Mon Sep 17 00:00:00 2001 From: Ceng23333 <441651826@qq.com> Date: Wed, 19 Aug 2026 12:49:05 +0800 Subject: [PATCH] fix(mars): use HPCC bfloat/fp16 headers instead of MACA Mars links the HPCC toolkit, so TypeMap must include hpcc_bfloat16.h and alias cuda_bfloat16 to __hpcc_bfloat16. --- src/native/cuda/mars/data_type_.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/native/cuda/mars/data_type_.h b/src/native/cuda/mars/data_type_.h index 5af956a..2a15ce5 100644 --- a/src/native/cuda/mars/data_type_.h +++ b/src/native/cuda/mars/data_type_.h @@ -1,8 +1,8 @@ #ifndef INFINI_RT_MARS_DATA_TYPE__H_ #define INFINI_RT_MARS_DATA_TYPE__H_ -#include -#include +#include +#include #include #include "data_type.h" @@ -10,6 +10,10 @@ namespace infini::rt { +using cuda_bfloat16 = __hpcc_bfloat16; + +using cuda_bfloat162 = __hpcc_bfloat162; + template <> struct TypeMap { using type = __half; @@ -17,7 +21,7 @@ struct TypeMap { template <> struct TypeMap { - using type = __maca_bfloat16; + using type = __hpcc_bfloat16; }; } // namespace infini::rt