| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 3 days ago | ||
| 2 months ago | ||
| 3 days ago | ||
| 18 days ago | ||
| 3 days ago | ||
| 3 days ago |
SubMulConcat
English | 简体中文
Product Support Status
| Product | Supported |
|---|---|
| Ascend 950PR&950DT products | √ |
| Atlas A3 products | × |
| Atlas A2 products | √ |
| Atlas 200I/500 A2 inference products | × |
| Atlas inference products | × |
| Atlas training products | × |
Function Description
SubMulConcat is an internal fusion operator. It is generated by the existing CANN graph fusion process that fuses the original graph composed of Sub, Mul, and Concat/ConcatV2/ConcatV2D. The operator has no public ACLNN API and does not support directly constructing SubMulConcat nodes.
[general]This directory retains the internal OpDef and InferShape, which are used only for internal nodes after graph fusion. Fusion rules are not delivered this time, and no public REG_OP or ACLNN API is added.[existing]The Ascend910B implementation corresponding to Atlas A2 continues to be maintained in canndev. Its arch32 Tiling, Kernel, or UT is not migrated to this directory this time.[RegBase-native]This directory adds and delivers only the arch35 Host Tiling and RegTensor-based Kernel implementation of Ascend950.
For the inputs xx and yy that are both of the float32 data type, both in the ND format, and both with the shape [N,H,W][N,H,W], the computation formula is as follows:
z=Concat([x, y, x−y, x⊙y], axis=−1),z∈RN×H×4W.z = \operatorname{Concat}\left([x,\ y,\ x-y,\ x\odot y],\ \mathrm{axis}=-1\right), \qquad z\in\mathbb{R}^{N\times H\times 4W}.
Here, ⊙\odot denotes element-wise multiplication.
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x | Input | The input tensor $x$ in the formula, with the shape $[N,H,W]$. | FLOAT | ND |
| y | Input | The input tensor $y$ in the formula, with the shape $[N,H,W]$, which is the same as that of $x$. | FLOAT | ND |
| z | Output | The output tensor $z$ in the formula, with the shape $[N,H,4W]$. | FLOAT | ND |
| axis | Optional attribute | Internal concatenation axis. The default value is -1. The concatenation axis of the source graph can be -1 or 2, and it is uniformly normalized to -1 after fusion. | INT64 | - |
Constraint Description
- The inputs
xandysupport only the FLOAT data type and the ND format, and must be three-dimensional tensors [N,H,W][N,H,W] with the same shape. - Under the existing graph fusion rules, the original graph must concatenate the 4 inputs in the order of
x,y,x-y, andx*y, and the concatenation axis of Concat/ConcatV2/ConcatV2D must be -1 or 2. - The internal node accepts only
axisvalues -1 and 2; other values are rejected by InferShape. - In dynamic shape scenarios, input dimensions may use the unknown-dimension descriptor -1. An unknown last dimension is not multiplied by 4×W4 \times W and is preserved as is. The unknown-rank descriptor -2 is not part of this operator's rank-3 input contract and is rejected by InferShape.
- The outputs of Sub and Mul can be consumed only by this concatenation node. Otherwise, the existing graph fusion rules will not generate the SubMulConcat node.
- SubMulConcat is generated only by the existing graph fusion process. It has no public ACLNN API and does not support directly constructing its internal nodes.
Invocation Description
| Invocation Method | Sample Code | Description |
|---|---|---|
| GE graph mode | - | Supports only converting the original graph of the public Sub, Mul, and Concat/ConcatV2/ConcatV2D into internal nodes through the existing CANN graph fusion process. This directory does not deliver fusion rules and does not provide an API for directly constructing SubMulConcat. The input, output, and attribute definitions of the internal node are available in the Host operator definition. |
SubMulConcat does not provide an aclnn API or PyTorch API, and does not provide an API for directly constructing internal nodes in GE graph mode.