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