aclSysParamOpt

typedef enum { 
    ACL_OPT_DETERMINISTIC = 0,
    ACL_OPT_ENABLE_DEBUG_KERNEL = 1
} aclSysParamOpt;
Table 1 Enumeration items

Enumerated Item

Description

ACL_OPT_DETERMINISTIC

Whether to enable deterministic computing.

  • 0: disables deterministic computing. It is the default value.
  • 1: enables deterministic computing.

When deterministic computing is enabled, the same output is generated if an operator is executed for multiple times with the same hardware and input. This often slows down operator execution.

By default, deterministic computing is disabled. The results of multiple executions of an operator with the same hardware and input may be different. This is generally caused by asynchronous multi-thread executions during operator implementation, which changes the accumulation sequence of floating point numbers.

You are advised not to enable deterministic computing because it slows down operator execution and affects performance. If the execution results of a model are different for multiple times or the precision needs to be optimized, you can enable deterministic computing to assist model debugging and optimization.

ACL_OPT_ENABLE_DEBUG_KERNEL

Whether to enable detection for out-of-bounds global memory access in the operator execution phase.

  • 0: disables detection for out-of-bounds global memory access. It is the default value.
  • 1: enables detection for out-of-bounds global memory access.

Before compiling an operator, call aclSetCompileopt to set ACL_OP_DEBUG_OPTION to oom, and call aclrtCtxSetSysParamOpt (with the scope of context) or aclrtSetSysParamOpt (with the scope of process) to set ACL_OPT_ENABLE_DEBUG_KERNEL to 1 to enable detection for out-of-bounds global memory access. During operator execution, if out-of-bounds access occurs when data is read or written (such as reading an operator to input data and writing an operator to output data) from the global memory, AscendCL returns the error code "EZ9999", indicating that an AI Core error occurs.