Input and Output
Input and output when type is LINEAR_ALL_REDUCE, LINEAR_REDUCE_SCATTER, ALL_GATHER_LINEAR, PURE_LINEAR, or ALL_GATHER_LINEAR_REDUCE_SCATTER.
Input
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
input |
[m, k]/[batch, m, k] |
|
ND |
Matrix A for matrix multiplication.
|
weight |
ND: [k, n] NZ:
mc2:
|
|
ND/NZ |
Weight, matrix B for matrix multiplication.
|
bias |
|
|
ND |
Added bias matrix Not supported when ALL_GATHER_LINEAR_REDUCE_SCATTER is used. |
deqScale |
|
|
ND |
Scale of dequantization. This parameter is required only in quantization scenarios. Not supported when type is ALL_GATHER_LINEAR_REDUCE_SCATTER. allgatherV2 does not support quantization. allgatherV2 refers to the scenario where type is ALL_GATHER_LINEAR and keepIntermediate is true. |
residual |
[n] |
float16/bf16 |
ND |
Residual, which is added to the final output result. Not supported when type is ALL_GATHER_LINEAR_REDUCE_SCATTER. Residuals are not supported in non-quantization scenarios. |
perTokenScale |
[m] |
float |
ND |
Per-token dequantization scale, which is input during quantization and is required only when quantType is QUANT_TYPE_PER_TOKEN. |
Output
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
output |
|
float16/bf16 |
ND |
Output tensor. The number of dimensions is the same as that of x. |
intermediateOutput |
[m*rankSize, n]/[batch*rankSize, m, n] |
float16/bf16 |
ND |
Output tensor. The number of dimensions is the same as that of x. This parameter is valid only when keepIntermediate is set to true and ParallelType is set to ALL_GATHER_LINEAR. |