Skip to main content

Mojo function

layer_norm_gpu

layer_norm_gpu[dtype: DType, rank: Int, //, input_fn: fn[Int, Int](IndexList[$1]) capturing -> SIMD[dtype, $0], gamma_fn: fn[Int, Int](IndexList[$1]) capturing -> SIMD[dtype, $0], output_fn: fn[Int, Int, Int](idx: IndexList[$1], val: SIMD[dtype, $0]) capturing -> None](shape: IndexList[rank, element_type=element_type], beta: LayoutTensor[dtype, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], epsilon: Scalar[dtype], *, ctx: DeviceContext)

Was this page helpful?