aclSysParamOpt
typedef enum {
ACL_OPT_DETERMINISTIC = 0,
ACL_OPT_ENABLE_DEBUG_KERNEL = 1,
ACL_OPT_STRONG_CONSISTENCY = 2,
} aclSysParamOpt;
Enumeration Item |
Description |
|---|---|
ACL_OPT_DETERMINISTIC |
Whether to enable 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.
Before compiling an operator, call to set ACL_OP_DEBUG_OPTION to oom, and call (with the scope of context) or (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 from or written to the global memory (for example, reading the operator input data or writing the operator output data), the error code "EZ9999" is returned, indicating that the operator has an AI Core error. |
ACL_OPT_STRONG_CONSISTENCY |
Enables or disables strong consistency computing. Reserved parameter. The current configuration is invalid. 0: disables strong consistency computing. It is the default value. 1: enables strong consistency computing. If strong consistency computing is enabled, the computing result is deterministic, meaning that multiple executions will generate the same result. In addition, the computing result is irrelevant to the data location. For example, when performing matrix multiplication, the order of accumulation across different rows may vary, which can lead to slight differences in results for the same data in different rows. However, when strong consistency computing is enabled, the results will remain consistent across rows as long as the inputs are the same. By default, strong consistency computing is not enabled, which may cause inconsistencies in results when the same data appears in different rows. It is generally recommended not to enable strong consistency computing, as doing so slows down operator execution and affects performance. It should only be enabled when strict consistency of results for identical data in different positions is required, or when precision tuning is needed to assist with model debugging and optimization. |