已合并
acts_ulq算子修改proto注释,与算子原型注释对齐 #8666
huangzhiyuan创建于 18 天前
acts_ulq算子修改proto注释,与算子原型注释对齐 #8666
已合并
共 1 个文件变更+34-14
| @@ -21,20 +21,40 @@ | |||
| 21 | namespace ge { | 21 | namespace ge { |
| 22 | 22 | ||
| 23 | /** | 23 | /** |
| 24 | - * @brief ActsULQ fake quantization operator for QAT | 24 | +*@brief Activations Universal Linear Quantization. \n |
| 25 | - * @par Inputs: | 25 | + |
| 26 | - * @li data: A Tensor. Must be one of: float16, float32. | 26 | +*@par Inputs: |
| 27 | - * @li clamp_min: A Tensor. Same dtype as data. | 27 | +*@li x: A Tensor of feature map. Must be one of the following types: float16, float32. |
| 28 | - * @li clamp_max: A Tensor. Same dtype as data. | 28 | +* Supports empty Tensor. The format support ND. Supports 0-8 dimensions. |
| 29 | - * @par Attributes: | 29 | +*@li clamp_min: A Tensor of the min clamp value of feature map. Must be one of the |
| 30 | - * @li fixed_min: Bool. Default false. | 30 | +* following types: float16, float32, and the data type must be the same as "x". |
| 31 | - * @li num_bits: Int. Default 8. | 31 | +* Does not support empty Tensor. The format support ND. The shape must be 1. |
| 32 | - * @par Outputs: | 32 | +*@li clamp_max: A Tensor of the max clamp value of feature map. Must be one of the |
| 33 | - * @li output: A Tensor. Same dtype as data. | 33 | +* following types: float16, float32, and the data type must be the same as "x". |
| 34 | - * @li clamp_min_mask: A Tensor. Same dtype as data. | 34 | +* Does not support empty Tensor. The format support ND. The shape must be 1. \n |
| 35 | - * @li clamp_max_mask: A Tensor. Same dtype as data. | 35 | + |
| 36 | - * @li x_clamped_loss: A Tensor. Same dtype as data. | 36 | +*@par Attributes: |
| 37 | - */ | 37 | +*@li fixed_min: (Optional) Bool, default false. Whether to fix the lower bound to zero. |
| 38 | +* When true, ori_clip_min = 0; when false, ori_clip_min = min(clamp_min, 0). | ||
| 39 | +*@li num_bits: (Optional) Int, default 8. Quantization bit-width. Only 8 is supported currently. \n | ||
| 40 | + | ||
| 41 | +*@par Outputs: | ||
| 42 | +*@li y: A Tensor of the fake quant feature map. Must be one of the following types: | ||
| 43 | +* float16, float32, and the data type must be the same as "x". Supports empty Tensor. | ||
| 44 | +* The format support ND. The shape must be the same as "x". | ||
| 45 | +*@li clamp_min_mask: A Tensor of the lower-bound mask, value 1.0 (x >= clip_min) or 0.0. | ||
| 46 | +* Must be one of the following types: bool, float16, float32. Supports empty Tensor. | ||
| 47 | +* The format support ND. The shape must be the same as "y". | ||
| 48 | +*@li clamp_max_mask: A Tensor of the upper-bound mask, value 1.0 (x <= clip_max) or 0.0. | ||
| 49 | +* Must be one of the following types: bool, float16, float32. Supports empty Tensor. | ||
| 50 | +* The format support ND. The shape must be the same as "y". | ||
| 51 | +*@li x_clamped_loss: A Tensor of the clamp loss. Must be one of the following types: | ||
| 52 | +* float16, float32. Supports empty Tensor. The format support ND. The shape must be | ||
| 53 | +* the same as "y". \n | ||
| 54 | + | ||
| 55 | +*@par Third-party framework compatibility | ||
| 56 | +*Compatible with MindSpore operator ActsULQ. | ||
| 57 | +*/ | ||
| 38 | 58 | ||
| 39 | 59 | ||
| 40 | REG_OP(ActsULQ) | 60 | REG_OP(ActsULQ) |