aclnninit
Function Usage
Initializes aclnn before any aclnn API is called. It is the initialization API of the single-operator API execution framework.
Either aclnnInit or aclInit can be called to initialize aclnn. The difference is that aclnnInit initializes only aclnn, while aclInit initializes aclnn and all sub-functions in AscendCL.
Compared with the aclInit API, aclnnInit is more lightweight.
Constraints
- This API must be used together with aclnnFinalize.
- aclnnInit can be called only once per process.
Prototype
aclnnStatus aclnnInit(const char *configPath)
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
configPath |
Input |
Path (including the file name) of the aclnn initialization configuration file. Developers can enable the debugging capability of the aclnn API through this configuration. The default value is NULL. The configuration file must be in JSON format. For example, if the value of configPath is /home/acl.json, the configuration example of acl.json is as follows:
The values of enable_debug_kernel are as follows:
|
Returns
0 on success; else, failure.