Merged
[acts_ulq_input_grad] 补 InferDataType UT 与 README 移除掩码取值限制 #13506
[acts_ulq_input_grad] 补 InferDataType UT 与 README 移除掩码取值限制 #13506
Merged
wangweidongAdd on 18 days ago
Total: 2 files changed+4-6
@@ -28,8 +28,8 @@
28| 参数名 | 输入/输出/属性 | 描述 | 数据类型 | 数据格式 |28| 参数名 | 输入/输出/属性 | 描述 | 数据类型 | 数据格式 |
29|--------|---------------|------|----------|----------|29|--------|---------------|------|----------|----------|
30| y_grad | 输入 | 表示上游传入的梯度张量,对应公式中y_grad;shape需与clamp_min_mask、clamp_max_mask、x_grad完全一致。 | FLOAT、FLOAT16 | ND |30| y_grad | 输入 | 表示上游传入的梯度张量,对应公式中y_grad;shape需与clamp_min_mask、clamp_max_mask、x_grad完全一致。 | FLOAT、FLOAT16 | ND |
31-| clamp_min_mask | 输入 | 表示下界clamp掩码张量,对应公式中clamp_min_mask,取值 {0,1};数据类型为bool或与y_grad相同的浮点;shape需与y_grad一致。 | BOOL、FLOAT16、FLOAT | ND |31+| clamp_min_mask | 输入 | 表示下界clamp掩码张量,对应公式中clamp_min_mask;数据类型为bool或与y_grad相同的浮点;shape需与y_grad一致。 | BOOL、FLOAT16、FLOAT | ND |
32-| clamp_max_mask | 输入 | 表示上界clamp掩码张量,对应公式中clamp_max_mask,取值 {0,1};数据类型必须与clamp_min_mask一致;shape需与y_grad一致。 | BOOL、FLOAT16、FLOAT | ND |32+| clamp_max_mask | 输入 | 表示上界clamp掩码张量,对应公式中clamp_max_mask;数据类型必须与clamp_min_mask一致;shape需与y_grad一致。 | BOOL、FLOAT16、FLOAT | ND |
33| x_grad | 输出 | 门控后的输入梯度张量,对应公式中x_grad;数据类型必须与y_grad一致;shape必须与y_grad一致。 | FLOAT、FLOAT16 | ND |33| x_grad | 输出 | 门控后的输入梯度张量,对应公式中x_grad;数据类型必须与y_grad一致;shape必须与y_grad一致。 | FLOAT、FLOAT16 | ND |
34 34 
35## 约束说明35## 约束说明
@@ -44,7 +44,6 @@
44 | FLOAT | BOOL | FLOAT |44 | FLOAT | BOOL | FLOAT |
45 | FLOAT | FLOAT | FLOAT |45 | FLOAT | FLOAT | FLOAT |
46 46 
47-- clamp_min_mask与clamp_max_mask的语义值应为0或1;掩码取值为(0,1)区间的连续浮点时,按一般逐元素乘法语义计算(`x_grad = y_grad * mask_min * mask_max`)。
48- 三个输入与输出的shape必须完全一致(无广播),支持空Tensor。47- 三个输入与输出的shape必须完全一致(无广播),支持空Tensor。
49 48 
50## 调用说明49## 调用说明
@@ -30,8 +30,8 @@ English | [简体中文](./README.md)
30| Parameter name | Input/Output/Attribute | Description | Data type | Data format |30| Parameter name | Input/Output/Attribute | Description | Data type | Data format |
31|--------|---------------|------|----------|----------|31|--------|---------------|------|----------|----------|
32| y_grad | Input | Denotes the gradient tensor passed in from upstream, corresponding to y_grad in the formula. Its shape must be exactly the same as clamp_min_mask, clamp_max_mask, and x_grad. | FLOAT, FLOAT16 | ND |32| y_grad | Input | Denotes the gradient tensor passed in from upstream, corresponding to y_grad in the formula. Its shape must be exactly the same as clamp_min_mask, clamp_max_mask, and x_grad. | FLOAT, FLOAT16 | ND |
33-| clamp_min_mask | Input | Denotes the lower-bound clamp mask tensor, corresponding to clamp_min_mask in the formula, with values {0,1}. Its data type is bool or the same floating-point type as y_grad. Its shape must match y_grad. | BOOL, FLOAT16, FLOAT | ND |33+| clamp_min_mask | Input | Denotes the lower-bound clamp mask tensor, corresponding to clamp_min_mask in the formula. Its data type is bool or the same floating-point type as y_grad. Its shape must match y_grad. | BOOL, FLOAT16, FLOAT | ND |
34-| clamp_max_mask | Input | Denotes the upper-bound clamp mask tensor, corresponding to clamp_max_mask in the formula, with values {0,1}. Its data type must be the same as clamp_min_mask. Its shape must match y_grad. | BOOL, FLOAT16, FLOAT | ND |34+| clamp_max_mask | Input | Denotes the upper-bound clamp mask tensor, corresponding to clamp_max_mask in the formula. Its data type must be the same as clamp_min_mask. Its shape must match y_grad. | BOOL, FLOAT16, FLOAT | ND |
35| x_grad | Output | The gated input gradient tensor, corresponding to x_grad in the formula. Its data type must be the same as y_grad, and its shape must match y_grad. | FLOAT, FLOAT16 | ND |35| x_grad | Output | The gated input gradient tensor, corresponding to x_grad in the formula. Its data type must be the same as y_grad, and its shape must match y_grad. | FLOAT, FLOAT16 | ND |
36 36 
37## Constraints37## Constraints
@@ -46,7 +46,6 @@ English | [简体中文](./README.md)
46 | FLOAT | BOOL | FLOAT |46 | FLOAT | BOOL | FLOAT |
47 | FLOAT | FLOAT | FLOAT |47 | FLOAT | FLOAT | FLOAT |
48 48 
49-- The semantic values of clamp_min_mask and clamp_max_mask should be 0 or 1.
50- The shapes of the three inputs and the output must be exactly the same (no broadcasting), and empty tensors are supported.49- The shapes of the three inputs and the output must be exactly the same (no broadcasting), and empty tensors are supported.
51 50 
52## Invocation Description51## Invocation Description