Merged
docs: 修正 MaskedSoftmaxWithRelPosBias 和 ExpandIntoJaggedPermute 输出非连续支持说明 #14401
Nice tryAdd on 8 days ago
docs: 修正 MaskedSoftmaxWithRelPosBias 和 ExpandIntoJaggedPermute 输出非连续支持说明 #14401
Merged
Nice tryAdd on 8 days ago
Total: 4 files changed+16-10
@@ -127,11 +127,11 @@ aclnnStatus aclnnExpandIntoJaggedPermute(
127 <td>out</td>127 <td>out</td>
128 <td>输出</td>128 <td>输出</td>
129 <td>公式中的输出。</td>129 <td>公式中的输出。</td>
130- <td>shape为(outputSize)。</td>130+ <td>shape为(outputSize),仅支持连续tensor。</td>
131 <td>与permute一致。</td>131 <td>与permute一致。</td>
132 <td>ND</td>132 <td>ND</td>
133 <td>-</td>133 <td>-</td>
134- <td>√</td>134+ <td>×</td>
135 </tr>135 </tr>
136 <tr>136 <tr>
137 <td>workspaceSize</td>137 <td>workspaceSize</td>
@@ -251,6 +251,8 @@ aclnnStatus aclnnExpandIntoJaggedPermute(
251 251 
2524. 设P为permute的长度。P=0时outputSize必须为0;P>0时outputSize必须大于等于P。2524. 设P为permute的长度。P=0时outputSize必须为0;P>0时outputSize必须大于等于P。
253 253 
254+5. out不支持非连续Tensor,仅支持连续Tensor。
255+ 
254## 调用示例256## 调用示例
255 257 
256示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。258示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。
@@ -129,11 +129,11 @@ aclnnStatus aclnnExpandIntoJaggedPermute(
129 <td>out</td>129 <td>out</td>
130 <td>Output</td>130 <td>Output</td>
131 <td>Output in the formula.</td>131 <td>Output in the formula.</td>
132- <td>The shape is (outputSize).</td>132+ <td>The shape is (outputSize). Only contiguous tensors are supported.</td>
133 <td>Consistent with permute.</td>133 <td>Consistent with permute.</td>
134 <td>ND</td>134 <td>ND</td>
135 <td>-</td>135 <td>-</td>
136- <td>√</td>136+ <td>×</td>
137 </tr>137 </tr>
138 <tr>138 <tr>
139 <td>workspaceSize</td>139 <td>workspaceSize</td>
@@ -255,6 +255,8 @@ aclnnStatus aclnnExpandIntoJaggedPermute(
2554. Let P be the length of permute. When P is 0, outputSize must be 0. When P is greater than 0, outputSize must be2554. Let P be the length of permute. When P is 0, outputSize must be 0. When P is greater than 0, outputSize must be
256 greater than or equal to P.256 greater than or equal to P.
257 257 
258+5. out does not support non-contiguous tensors and must be a contiguous tensor.
259+ 
258## Example260## Example
259 261 
260The following sample code is for reference only. For details about compilation and execution, see [Compile and Run Samples](../../../docs/en/context/compile_and_run_sample.md).262The following sample code is for reference only. For details about compilation and execution, see [Compile and Run Samples](../../../docs/en/context/compile_and_run_sample.md).
@@ -128,10 +128,10 @@ aclnnStatus aclnnMaskedSoftmaxWithRelPosBias(
128 <td>out</td>128 <td>out</td>
129 <td>输出</td>129 <td>输出</td>
130 <td>待计算出参,对应公式中的out。</td>130 <td>待计算出参,对应公式中的out。</td>
131- <td>shape与x相同。</td>131+ <td>shape与x相同,仅支持连续tensor。</td>
132 <td>FLOAT、FLOAT16、BFLOAT16</td>132 <td>FLOAT、FLOAT16、BFLOAT16</td>
133 <td>ND</td>133 <td>ND</td>
134- <td>√</td>134+ <td>×</td>
135 </tr>135 </tr>
136 <tr>136 <tr>
137 <td>workspaceSize</td>137 <td>workspaceSize</td>
@@ -246,7 +246,8 @@ aclnnStatus aclnnMaskedSoftmaxWithRelPosBias(
246 - innerPrecisionMode为保留字段,当前仅支持取值0,传入其他值时算子报错。246 - innerPrecisionMode为保留字段,当前仅支持取值0,传入其他值时算子报错。
247 247 
248- 非连续Tensor支持:248- 非连续Tensor支持:
249- - x、attenMaskOptional、relativePosBias、out均支持非连续Tensor(即strides不满足连续存储条件的Tensor),传入后由框架自动转为连续Tensor再参与计算。249+ - x、attenMaskOptional、relativePosBias支持非连续Tensor(即strides不满足连续存储条件的Tensor),传入后由框架自动转为连续Tensor再参与计算。
250+ - out不支持非连续Tensor,仅支持连续Tensor。
250 251 
251<!-- npu="310p" id8 -->252<!-- npu="310p" id8 -->
252- <term>Atlas推理系列产品</term>:不支持入参x的最后一个维度S2非32Byte对齐的场景。253- <term>Atlas推理系列产品</term>:不支持入参x的最后一个维度S2非32Byte对齐的场景。
@@ -130,10 +130,10 @@ aclnnStatus aclnnMaskedSoftmaxWithRelPosBias(
130 <td>out</td>130 <td>out</td>
131 <td>Output</td>131 <td>Output</td>
132 <td>Output to be computed, corresponding to out in the formula.</td>132 <td>Output to be computed, corresponding to out in the formula.</td>
133- <td>Same shape as x.</td>133+ <td>Same shape as x. Only contiguous tensors are supported.</td>
134 <td>FLOAT, FLOAT16, BFLOAT16</td>134 <td>FLOAT, FLOAT16, BFLOAT16</td>
135 <td>ND</td>135 <td>ND</td>
136- <td>√</td>136+ <td>×</td>
137 </tr>137 </tr>
138 <tr>138 <tr>
139 <td>workspaceSize</td>139 <td>workspaceSize</td>
@@ -251,7 +251,8 @@ aclnnStatus aclnnMaskedSoftmaxWithRelPosBias(
251 - innerPrecisionMode is a reserved field. Currently, only the value 0 is supported. The operator reports an error if any other value is passed in.251 - innerPrecisionMode is a reserved field. Currently, only the value 0 is supported. The operator reports an error if any other value is passed in.
252 252 
253- Non-contiguous tensor support:253- Non-contiguous tensor support:
254- - x, attenMaskOptional, relativePosBias, and out support non-contiguous tensors (that is, tensors whose strides do not meet the contiguous storage condition). After being passed in, they are automatically converted to contiguous tensors by the framework before computation.254+ - x, attenMaskOptional, and relativePosBias support non-contiguous tensors (that is, tensors whose strides do not meet the contiguous storage condition). After being passed in, they are automatically converted to contiguous tensors by the framework before computation.
255+ - out does not support non-contiguous tensors and must be a contiguous tensor.
255 256 
256<!-- npu="310p" id8 -->257<!-- npu="310p" id8 -->
257- <term>Atlas inference products</term>: The scenario where the last dimension S2 of the input parameter x is not aligned to 32 bytes is not supported.258- <term>Atlas inference products</term>: The scenario where the last dimension S2 of the input parameter x is not aligned to 32 bytes is not supported.