asc_override_strategy
asc_override_strategy用于表示饱和控制策略,在调用asc_set_saturation_strategy和asc_get_saturation_strategy时使用。该策略影响CAST类全局饱和配置是否生效。
枚举类具体定义
C++
enum class asc_override_strategy : uint8_t {
USE_API = 0,
USE_GLOBAL = 1
};
枚举值详解
表1 枚举值说明
| 枚举值 | 说明 |
|---|---|
| USE_API | 按单指令/API路径配置饱和。此时通过asc_set_saturation_flag配置的全局CAST饱和不生效。 |
| USE_GLOBAL | 使用全局饱和配置。此时通过asc_set_saturation_flag配置的CAST模式才会在精度转换中生效。 |
典型用法:USE_GLOBAL配合CAST饱和做float→int32动态量化,参见asc_set_saturation_strategy调用示例及Cast样例;USE_API配合单指令饱和参见Cast中SatMode与饱和模式全局或单指令生效配置表。