当前位置:网站首页>Some error reporting assemblies of cann code

Some error reporting assemblies of cann code

2022-06-11 21:23:00 Hua Weiyun

  1. [acl_init]-841: aclInit failed with 100002.

Introduce the background , Namely CANN There are... In the experience camp 2 A series connection of small functions . In this way, first of all, in form 2 The code of three small functions is connected in series , After compilation , This error occurs when running .
First look at the meaning of the error code , stay include/acl/acl_base.h Defined in :

static const int ACL_SUCCESS = 0;static const int ACL_ERROR_INVALID_PARAM = 100000;static const int ACL_ERROR_UNINITIALIZE = 100001;static const int ACL_ERROR_REPEAT_INITIALIZE = 100002;

According to the error code 100002, So the error message is :ACL_ERROR_REPEAT_INITIALIZE, This means repeated initialization .
There is indeed repeated initialization , because 2 All the small functions have been initialized at the beginning , Although the initialization is also done at the end , However, it is impossible to initialize after de initialization , It's a little hard to understand , Let's look it up aclInit Documents :
The constraint description is very clear :

You can only call once in a process aclInit Interface .

And media data processing initialization hi_mpi_sys_init It can be done repeatedly .

In standard form , Need to apply AscendCL Call this interface after running the management resources .
In a process , This interface can be called Initialize repeatedly , Do not return failed .


[acl_destory_resource]-877: destroy context failed with 100000.
[acl_destory_resource]-881: reset device(0) failed with 507007.
[acl_destory_resource]-885: finalize acl failed with 100037.

These errors are listed together , All of them are error codes reported when resources are released . The cause of error reporting is similar to the error reporting initialized above , I.e. caused by repeated release . The error codes are defined in 2 In the header file , as follows .
include/acl/acl_base.h:

static const int ACL_ERROR_INVALID_PARAM = 100000; // Release after release content The pointer is empty , So content The pointer is an invalid parameter static const int ACL_ERROR_REPEAT_FINALIZE = 100037;

include/acl/error_codes/rt_error_codes.h:
static const int32_t ACL_ERROR_RT_CONTEXT_RELEASE_ERROR = 507007; // context release error

summary :

  1. acl initialization 、 De initialization cannot be repeated
  2. Media data preprocessing hi_mpi Can repeat
原网站

版权声明
本文为[Hua Weiyun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206112120227161.html