BiasGelu (CPU)#

  • Domain: com.microsoft

  • Device: CPU

  • Kernel: onnx_light_cpu::BiasGelu

  • Supported types: FLOAT, DOUBLE, FLOAT16, BFLOAT16

  • Opset bounds: since opset 1

Operator support#

Capability

Implementation

Shape inference

onnx_light_cpu::ComputeShapeBiasGelu()

Peak memory

onnx_light_cpu::ComputePeakMemoryBiasGelu()

Fusion patterns

onnx_light_cpu::BiasGeluFusionPattern

Gradient

onnx_light_cpu::RegisterCustomOperatorGradients()

LightOpSchema#

Version: 1

Adds a rank-1 bias to the last input dimension and applies the exact Gaussian Error Linear Unit.

Inputs

  • A (T): The input tensor.

  • B (T): The rank-1 bias whose length matches the last dimension of A.

Outputs

  • C (T): The output tensor, with the same shape and type as A.

Type constraints

  • T: Constrain inputs and output to floating-point tensors. Allowed types: tensor(bfloat16), tensor(double), tensor(float), tensor(float16).