昇腾社区首页
中文
注册
开发者
下载

算子使用"-O0 -g"编译选项编译后,运行出错,"min stack size is xxx, larger than current process default size 32768. Please modify aclInit json, and reboot process."

现象描述

算子使用"-O0 -g"编译选项编译后,运行出错,出现以下报错。

[ERROR] xxx min stack size is xxx, larger than current process default size 32768. Please modify aclInit json, and reboot process.

原因分析

出现该错误代表核函数使用的栈空间过大,超过了当前进程默认配置的栈空间大小,算子注册失败。

解决措施

参考AI Core栈空间大小配置示例,在aclInit()接口传入的json文件中,配置更大的栈空间,比如在json文件中增加如下配置,扩大栈空间大小至65536字节:
{   
      "StackSize":{
            "aicore_stack_size":65536   
      } 
}