Mojo function
gelu
gelu[type: DType, simd_width: Int](x: SIMD[type, simd_width]) -> SIMD[type, simd_width]
Compute the GELU Op using the equation .
Constraints:
Type must be a floating point type.
Parameters:
- type (
DType
): DType used for the computation. - simd_width (
Int
): SIMD width used for the computation.
Args:
- x (
SIMD[type, simd_width]
): The value to compute the GELU operation on.
Returns:
The result of the GELU operation.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!