Input and Output
ELEWISE_CAST (Data Type Conversion)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, dim_1, ..., dim_n] |
float16/float/int64/int32/bf16 |
ND |
Input before conversion |
out |
[dim_0, dim_1, ..., dim_n] |
float16/float/int64/int32/bf16 |
ND |
Output after conversion
|
ELEWISE_MULS (Element-wise Vector Multiplication)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, dim_1, ..., dim_n] |
float16/float/bf16 |
ND |
Input. |
out |
[dim_0, dim_1, ..., dim_n] |
float/float16/bf16 |
ND |
Output. The data type is the same as that of x. |
ELEWISE_COS (Element-wise Cosine Computation)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, dim_1, ..., dim_n] |
float/float16/bf16 |
ND |
Input. |
out |
[dim_0, dim_1, ..., dim_n] |
float/float16/bf16 |
ND |
Output. The data type is the same as that of x. |
ELEWISE_SIN (Element-wise Sine Computation)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, dim_1, ..., dim_n] |
float/float16/bf16 |
ND |
Input. |
out |
[dim_0, dim_1, ..., dim_n] |
float/float16/bf16 |
ND |
Output. The data type is the same as that of x. |
ELEWISE_NEG (Opposite Number Computation Element-wise)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, dim_1, ..., dim_n] |
float16/bf16 |
ND |
Input. |
out |
[dim_0, dim_1, ..., dim_n] |
float16/bf16 |
ND |
Output. The data type is the same as that of x. |
ELEWISE_QUANT (Quantization)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, dim_1, ..., dim_n] |
float16 |
ND |
Input. The size of the last dimension must be a multiple of 32. |
out |
[dim_0, dim_1, ..., dim_n] |
int8 |
ND |
Output. |
x/out does not support the |
||||
ELEWISE_LOGICAL_NOT (Element-wise Logical NOT)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, dim_1, ..., dim_n] |
int8 |
ND |
Input. |
out |
[dim_0, dim_1, ..., dim_n] |
int8 |
ND |
Output. |
ELEWISE_ADD (Element-wise Addition)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
float/float16/bf16/int32/int64 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Input 2. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Output. The data types of output, input 1, and input 2 must be the same. |
ELEWISE_MUL (Element-wise Vector-to-Vector Multiplication)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
float16/bf16 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Input 2. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Output. The data types of output, input 1, and input 2 must be the same. |
ELEWISE_REALDIV (Element-wise Vector-to-Vector Division)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
float/float16/bf16 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Input 2. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Output. The data types of output, input 1, and input 2 must be the same. |
ELEWISE_LOGICAL_AND (Element-wise Logical AND)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int8 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
int8 |
ND |
Input 2. The element values of input 1 and input 2 can only be 0 or 1. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int8 |
ND |
Output. |
ELEWISE_LOGICAL_OR (Element-wise Logical OR)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int8 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
int8 |
ND |
Input 2. The element values of input 1 and input 2 can only be 0 or 1. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int8 |
ND |
Output. |
ELEWISE_LESS (Element-wise Less Than Comparison)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int64/float/float16/bf16 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Input 2. The data types of input 1 and input 2 must be the same. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int8 |
ND |
Output. |
ELEWISE_GREATER (Element-wise Greater Than Comparison)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int64/float/float16/bf16 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Input 2. The data types of input 1 and input 2 must be the same. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int8 |
ND |
Output. |
ELEWISE_SUB (Element-wise Subtraction)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
float16/int64/bf16 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Input 2. The data types of input 1 and input 2 must be the same. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Output. |
ELEWISE_EQUAL (Element-wise Equal Comparison)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
float/float16/bf16 |
ND |
Input 1. |
y |
[y_dim_0, ..., y_dim_n] |
Same as x |
ND |
Input 2. The data types of input 1 and input 2 must be the same. |
out |
[x_dim_0, x_dim_1, ..., x_dim_n, y_dim_0, ..., y_dim_n] |
int8 |
ND |
Output. |
ELEWISE_QUANT_PER_CHANNEL (Quantization per Channel)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[x_dim_0, x_dim_1, ..., x_dim_n, dim_0, ..., dim_n] |
float16/bf16 |
ND |
Input 1. |
scale |
[dim_0, ..., dim_n] |
float16/bf16 |
ND |
Input 2. The element in scale cannot be 0. The data types of input 1 and input 2 must be the same. |
offset |
[dim_0, ..., dim_n] |
int8 |
ND |
Input 3. offset can be an empty tensor. |
y |
[x_dim_0, x_dim_1, ..., x_dim_n, dim_0, ..., dim_n] |
int8 |
ND |
Quantization output result |
ELEWISE_DEQUANT_PER_CHANNEL (Dequantization per Channel)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
y |
[x_dim_0, x_dim_1, ..., x_dim_n, dim_0, ..., dim_n] |
int8 |
ND |
Input vector 1. |
scale |
[dim_0, ..., dim_n] |
float16 |
ND |
Input vector 2. |
offset |
[dim_0, ..., dim_n] |
int8 |
ND |
Input vector 3. offset can be an empty tensor. The data types of input 1 and input 3 must be the same. |
x |
[x_dim_0, x_dim_1, ..., x_dim_n, dim_0, ..., dim_n] |
float16 |
ND |
Dequantization output result. |
ELEWISE_DYNAMIC_QUANT (Element-wise Dynamic Quantization)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, dim_1, ..., dim_n] |
float16/bf16 |
ND |
Input vector, where n is greater than 1. |
z |
[dim_0, dim_1, ..., dim_n] |
int8 |
ND |
Quantization output result |
scale |
[dim_0, ..., dim_n-1] |
float |
ND |
Output, scale required for dequantization. |
offset |
[dim_0, ..., dim_n-1] |
float |
ND |
Output, offset required for dequantization. This parameter is returned only when asymmetric is set to true. Currently, asymmetric cannot set to true. |
ELEWISE_TANH (Element-wise Hyperbolic Tangent Computation)
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
x |
[dim_0, ..., dim_n] |
float16 |
ND |
Input. |
out |
[dim_0, ..., dim_n] |
float16 |
ND |
Output. |