Skip to main content

Mojo function

rms_norm_cpu

rms_norm_cpu[dtype: DType, //, input_fn: fn[width: Int](Int, Int) capturing -> SIMD[dtype, width], output_fn: fn[width: Int, alignment: Int](Int, Int, SIMD[dtype, width]) capturing -> None, multiply_before_cast: Bool](gamma: TileTensor[dtype, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], epsilon: Scalar[dtype], weight_offset: Scalar[dtype], out_shape: IndexList[2])

rms_norm_cpu[dtype: DType, rank: Int, //, input_fn: fn[width: Int, rank: Int](IndexList[rank]) capturing -> SIMD[dtype, width], output_fn: fn[width: Int, alignment: Int](IndexList[rank], SIMD[dtype, width]) capturing -> None, multiply_before_cast: Bool](shape: IndexList[rank], gamma: TileTensor[dtype, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], epsilon: Scalar[dtype], weight_offset: Scalar[dtype])

Was this page helpful?