IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

rms_norm_fused_residual_add_cpu

def rms_norm_fused_residual_add_cpu[dtype: DType, rank: Int, //, input_0_fn: def[width: Int, rank: Int](IndexList[rank]) capturing -> SIMD[dtype, width], residual_input_fn: def[width: Int, rank: Int](IndexList[rank]) capturing -> SIMD[dtype, width], output_0_fn: def[width: Int, alignment: Int](idx: IndexList[rank], val: SIMD[dtype, width]) capturing -> None, output_residual_fn: def[width: Int, alignment: Int](IndexList[rank], SIMD[dtype, width]) capturing -> None, /, multiply_before_cast: Bool = True](shape: IndexList[rank], gamma1: TileTensor[dtype, address_space=gamma1.address_space, linear_idx_type=gamma1.linear_idx_type, element_size=gamma1.element_size], epsilon1: Scalar[dtype], weight_offset1: Scalar[dtype], gamma2: TileTensor[dtype, address_space=gamma2.address_space, linear_idx_type=gamma2.linear_idx_type, element_size=gamma2.element_size], epsilon2: Scalar[dtype], weight_offset2: Scalar[dtype])