Input and Output

ReLU Activation Type

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float/bf16

ND

Input

output

[dim_0, dim_1, ..., dim_n]

float/bf16

ND

Output

Same as the input dimension, type, and format.

FAST_GELU Activation Type

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Input

output

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Output

Same as the input dimension, type, and format.

LOG Activation Type

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Input

output

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Output

Same as the input dimension, type, and format.

SIGMOID Activation Type

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Input

output

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Output

Same as the input dimension, type, and format.

Only the float16 data type is supported on Atlas 200I/500 A2 inference products.

SWISH Activation Type

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Input

output

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Output

Same as the input dimension, type, and format.

GELU Activation Type

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Input

output

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Output

Same as the input dimension, type, and format.

SWIGLU_FORWARD Activation Type

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Input

When activationType is ACTIVATION_SWIGLU_FORWARD, the value of the last dimension must be a multiple of 32 for the Atlas inference products.

output

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Output

Has the same dimension, type, and format as the input. The size of dim is half of the input size.

SWIGLU_BACKWARD Activation Type

Parameter

Dimension

Data Type

Format

Description

x1

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Input

If activationType is set to ACTIVATION_SWIGLU_BACKWARD, the Atlas inference products is not supported.

x2

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Input

The dimension, type, and format are the same as those of x1. The size of dim is twice that of x1.

output

[dim_0, dim_1, ..., dim_n]

float16/float/bf16

ND

Output

The dimension, type, and format are the same as those of x1. The size of dim is twice that of x1.

FASTER_GELU_FORWARD Activation Type

Parameter

Dimension

Data Type

Format

Description

input

[dim_0, dim_1, ..., dim_n]

float/float16/bf16

ND

Input tensor

output

[dim_0, dim_1, ..., dim_n]

float/float16/bf16

ND

Output tensor. Has the same dimension, data type, and data format as the input tensor.