Skip to main content

Mojo function

sort_buf_descending

sort_buf_descending[type: DType, out_idx_type: DType](mut buf_keys: LayoutTensor[type, 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], mut buf_ids: LayoutTensor[out_idx_type, 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], vocab_size: Int)

Sort each batch separately in descending order using parallel merge sort.

Was this page helpful?