In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: error: a type specifier is required for all declarations
__aicore__ constexpr Hardware GetPhyType(TPosition pos)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: error: decomposition declaration cannot be declared with type 'int'; declared type must be 'auto' or reference to 'auto'
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: error: decomposition declaration '[aicore]' requires an initializer
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:11: error: expected ';' after top level declarator
__aicore__ constexpr Hardware GetPhyType(TPosition pos)
^
;
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: error: a type specifier is required for all declarations
__aicore__ constexpr TPosition GetPosition(TPosition srcPos, TPosition dstPos)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: error: decomposition declaration cannot be declared with type 'int'; declared type must be 'auto' or reference to 'auto'
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: error: redefinition of 'aicore'
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: note: previous definition is here
__aicore__ constexpr Hardware GetPhyType(TPosition pos)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: error: decomposition declaration '[aicore]' requires an initializer
__aicore__ constexpr TPosition GetPosition(TPosition srcPos, TPosition dstPos)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:11: error: expected ';' after top level declarator
__aicore__ constexpr TPosition GetPosition(TPosition srcPos, TPosition dstPos)
^
;
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:1: error: a type specifier is required for all declarations
__aicore__ constexpr Hardware GetBufferPos(TPosition srcPos, TPosition dstPos)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:1: error: decomposition declaration cannot be declared with type 'int'; declared type must be 'auto' or reference to 'auto'
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:1: error: redefinition of 'aicore'
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: note: previous definition is here
__aicore__ constexpr Hardware GetPhyType(TPosition pos)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:1: error: decomposition declaration '[aicore]' requires an initializer
__aicore__ constexpr Hardware GetBufferPos(TPosition srcPos, TPosition dstPos)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:11: error: expected ';' after top level declarator
__aicore__ constexpr Hardware GetBufferPos(TPosition srcPos, TPosition dstPos)
^
;
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:1: error: a type specifier is required for all declarations
__aicore__ constexpr TPosition GetBufferLogicPos(TPosition pos, bool isSrc)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:1: error: decomposition declaration cannot be declared with type 'int'; declared type must be 'auto' or reference to 'auto'
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:1: error: redefinition of 'aicore'
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: note: previous definition is here
__aicore__ constexpr TPosition GetPosition(TPosition srcPos, TPosition dstPos)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:1: error: decomposition declaration '[aicore]' requires an initializer
__aicore__ constexpr TPosition GetBufferLogicPos(TPosition pos, bool isSrc)
^
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__'
#define __aicore__ [aicore]
^
In file included from add_custom.cpp:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7:
In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19:
/usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:11: error: expected ';' after top level declarator
__aicore__ constexpr TPosition GetBufferLogicPos(TPosition pos, bool isSrc)
^
;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
代码地址
https://gitee.com/ascend/samples/blob/master/operator/AddCustomSample/KernelLaunch/AddKernelInvocation/add_custom.cpp
jupyter notebook中运行如下代码
import os ascend_toolkit_path = "/usr/local/Ascend/ascend-toolkit/latest" include_path = "" library_path = "" device_type = "Ascend910ProA" include_path += "-I" + ascend_toolkit_path + "/include " include_path += "-I" + ascend_toolkit_path + "/acllib/include " include_path += "-I" + ascend_toolkit_path + "/compiler/tikcpp " include_path += "-I" + ascend_toolkit_path + "/compiler/tikcpp/tikcfw " include_path += "-I" + ascend_toolkit_path + "/compiler/tikcpp/tikcfw/impl " include_path += "-I" + ascend_toolkit_path + "/compiler/tikcpp/tikcfw/interface " include_path += "-I" + ascend_toolkit_path + "/tools/tikicpulib/lib/include " library_path += "-L" + ascend_toolkit_path + "/runtime/lib64 " link_library = "-lruntime -lascendcl" # ! echo {include_path} ! ccec -Wall -std=c++17 -fPIC --cce-fatobj-link --cce-aicore-arch=dav-c100 {include_path} {library_path} {link_library} add_custom.cpp报错结果:
In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: error: a type specifier is required for all declarations __aicore__ constexpr Hardware GetPhyType(TPosition pos) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: error: decomposition declaration cannot be declared with type 'int'; declared type must be 'auto' or reference to 'auto' /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: error: decomposition declaration '[aicore]' requires an initializer /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:11: error: expected ';' after top level declarator __aicore__ constexpr Hardware GetPhyType(TPosition pos) ^ ; /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: error: a type specifier is required for all declarations __aicore__ constexpr TPosition GetPosition(TPosition srcPos, TPosition dstPos) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: error: decomposition declaration cannot be declared with type 'int'; declared type must be 'auto' or reference to 'auto' /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: error: redefinition of 'aicore' /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: note: previous definition is here __aicore__ constexpr Hardware GetPhyType(TPosition pos) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: error: decomposition declaration '[aicore]' requires an initializer __aicore__ constexpr TPosition GetPosition(TPosition srcPos, TPosition dstPos) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:11: error: expected ';' after top level declarator __aicore__ constexpr TPosition GetPosition(TPosition srcPos, TPosition dstPos) ^ ; /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:1: error: a type specifier is required for all declarations __aicore__ constexpr Hardware GetBufferPos(TPosition srcPos, TPosition dstPos) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:1: error: decomposition declaration cannot be declared with type 'int'; declared type must be 'auto' or reference to 'auto' /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:1: error: redefinition of 'aicore' /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:86:1: note: previous definition is here __aicore__ constexpr Hardware GetPhyType(TPosition pos) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:1: error: decomposition declaration '[aicore]' requires an initializer __aicore__ constexpr Hardware GetBufferPos(TPosition srcPos, TPosition dstPos) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:142:11: error: expected ';' after top level declarator __aicore__ constexpr Hardware GetBufferPos(TPosition srcPos, TPosition dstPos) ^ ; /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:1: error: a type specifier is required for all declarations __aicore__ constexpr TPosition GetBufferLogicPos(TPosition pos, bool isSrc) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:1: error: decomposition declaration cannot be declared with type 'int'; declared type must be 'auto' or reference to 'auto' /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:1: error: redefinition of 'aicore' /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:125:1: note: previous definition is here __aicore__ constexpr TPosition GetPosition(TPosition srcPos, TPosition dstPos) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:21: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:1: error: decomposition declaration '[aicore]' requires an initializer __aicore__ constexpr TPosition GetBufferLogicPos(TPosition pos, bool isSrc) ^ /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_macros.h:20:20: note: expanded from macro '__aicore__' #define __aicore__ [aicore] ^ In file included from add_custom.cpp:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/kernel_operator.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tpipe.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/interface/kernel_tensor.h:7: In file included from /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_utils.h:19: /usr/local/Ascend/ascend-toolkit/latest/compiler/tikcpp/tikcfw/impl/kernel_event.h:159:11: error: expected ';' after top level declarator __aicore__ constexpr TPosition GetBufferLogicPos(TPosition pos, bool isSrc) ^ ; fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated.