Skip to main content

Mojo function

sort_buf_descending

sort_buf_descending[dtype: DType, out_idx_type: DType](mut buf_keys: TileTensor[dtype, buf_keys.LayoutType, buf_keys.origin, address_space=buf_keys.address_space, linear_idx_type=buf_keys.linear_idx_type, element_size=buf_keys.element_size], mut buf_ids: TileTensor[out_idx_type, buf_ids.LayoutType, buf_ids.origin, address_space=buf_ids.address_space, linear_idx_type=buf_ids.linear_idx_type, element_size=buf_ids.element_size], vocab_size: Int)

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

Was this page helpful?