From 15bb2c8c0ba29277637867457ab2e9039706352f Mon Sep 17 00:00:00 2001 From: lishangfan Date: Tue, 23 Sep 2025 17:09:19 +0800 Subject: [PATCH] add __npu_host --- atvc/include/atvc.h | 2 ++ atvc/include/common/kernel_utils.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/atvc/include/atvc.h b/atvc/include/atvc.h index 37b9c555..187482e2 100644 --- a/atvc/include/atvc.h +++ b/atvc/include/atvc.h @@ -25,6 +25,7 @@ #include "kernel_operator.h" #ifndef __ASCC_HOST__ +#ifndef __NPU_HOST__ #include "common/kernel_utils.h" #include "elewise/elewise_op_template.h" #include "reduce/reduce_sum.h" @@ -32,5 +33,6 @@ #include "broadcast/broadcast_compute.h" #include "broadcast/broadcast_op_template.h" #endif +#endif #endif \ No newline at end of file diff --git a/atvc/include/common/kernel_utils.h b/atvc/include/common/kernel_utils.h index 0abbc7ba..6aa2d977 100644 --- a/atvc/include/common/kernel_utils.h +++ b/atvc/include/common/kernel_utils.h @@ -16,7 +16,9 @@ #include "kernel_operator.h" namespace ATVC { #ifndef __ASCC_HOST__ +#ifndef __NPU_HOST__ __BLOCK_LOCAL__ static AscendC::TPipe g_pipe; +#endif // __NPU_HOST__ #endif // __ASCC_HOST__ template __aicore__ inline void SetEvent(AscendC::HardEvent evt) -- Gitee