Ascend/sample开源用例问题
收藏回复举报
Ascend/sample开源用例问题
t('forum.solved') 已解决
发表于2026-05-06 16:08:06
0 查看

我想在昇腾310P3上写一个自定义的AI CPU算子,于是我基于开源的AI CPU算子

https://gitee.com/ascend/samples/tree/v1.11-8.5.0.alpha001/cplusplus/level1_single_api/4_op_dev/1_custom_op/cpukernel

做了一些实验,发现将提供的AI CPU算子的impl文件夹中提供的算子删除至只剩add_block_cust_kernel(对应的ini配置文件,op_proto原型文件也删除了),就会在执行的过程中报错507018,查看日志后发现不知道出于什么原因,算子未注册:

[WARNING] AICPU(20564,aicpu_custom_scheduler):2026-05-06-03:18:29.342.568 [cpu_kernel_register.cc:64][cpu_kernel_register.cc:64][GetCpuKernel][tid:20581]The kernel[AddBlockCust] is not registered

[INFO] AICPU(20564,aicpu_custom_scheduler):2026-05-06-03:18:29.342.519 [cpu_kernel_cache.cc:224][cpu_kernel_cache.cc:224][UpdateTensor][tid:20580]Set output[0] addr[20617990582272] success.

[INFO] AICPU(20564,aicpu_custom_scheduler):2026-05-06-03:18:29.342.558 [cpu_kernel_register.cc:89][cpu_kernel_register.cc:89][RunCpuKernel][tid:20578]RunCpuKernel[AddBlockCust] begin.

[WARNING] AICPU(20564,aicpu_custom_scheduler):2026-05-06-03:18:29.342.609 [cpu_kernel_register.cc:64][cpu_kernel_register.cc:64][GetCpuKernel][tid:20579]The kernel[AddBlockCust] is not registered

[ERROR] CCECPU(20564,aicpu_custom_scheduler):2026-05-06-03:18:29.342.634 [ae_kernel_lib_aicpu.cc:302][TransformKernelErrorCode][tid:20581][AICPU_PROCESSER] call aicpu api RunCpuKernelWithBlock in libcust_aicpu_kernels.so failed, ret:4294967295.

但是如果我把unique_cust这个算子加回来(对应的ini配置文件和op_proto原型文件也加回来),那么算子就可以正常运行。

这是为什么...

使用RunCpuKernelWithBlock是有什么隐藏的限制吗?

我要发帖子