Mojo function
rope_ragged
rope_ragged[dtype: DType, x_layout: Layout, freq_dtype: DType, input_row_offsets_layout: Layout, start_pos_layout: Layout, freqs_cis_layout: Layout, *, interleaved: Bool, target: StringSlice[StaticConstantOrigin], output_fn: fn[Int, Int](idx: IndexList[3], val: SIMD[dtype, $0]) capturing -> None, mrope_section: Optional[IntTuple] = None](x: LayoutTensor[dtype, x_layout, MutableAnyOrigin], input_row_offsets: LayoutTensor[DType.uint32, input_row_offsets_layout, MutableAnyOrigin], start_pos: LayoutTensor[DType.uint32, start_pos_layout, MutableAnyOrigin], freqs_cis: LayoutTensor[freq_dtype, freqs_cis_layout, MutableAnyOrigin], context: Optional[DeviceContext], position_ids: OptionalReg[LayoutTensor[DType.uint32, Layout.row_major(-1, -1), MutableAnyOrigin]] = OptionalReg[LayoutTensor[DType.uint32, Layout.row_major(-1, -1), MutableAnyOrigin]]({:i1 0, 1}))
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!