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
tpool_patch_merger
def tpool_patch_merger[dtype: DType, output_layout: TensorLayout, x_layout: TensorLayout, bounds_layout: TensorLayout](output: TileTensor[dtype, output_layout, MutAnyOrigin], x: TileTensor[dtype, x_layout, ImmutAnyOrigin], bounds: TileTensor[DType.int64, bounds_layout, ImmutAnyOrigin], kH: Int, kW: Int, max_h: Int, max_w: Int, ctx: DeviceContext)
Temporal pooling patch merger entry point.
Parameters:
- βdtype (
DType): Element type of the input and output tensors. - βoutput_layout (
TensorLayout): Memory layout of the output tensor. - βx_layout (
TensorLayout): Memory layout of the input tensor. - βbounds_layout (
TensorLayout): Memory layout of the bounds tensor.
Args:
- βoutput (
TileTensor[dtype, output_layout, MutAnyOrigin]): Contiguous output tensor [total_output_patches, D]. - βx (
TileTensor[dtype, x_layout, ImmutAnyOrigin]): Input tensor [n_tokens, D]. - βbounds (
TileTensor[DType.int64, bounds_layout, ImmutAnyOrigin]): Grid dimensions tensor [n_vids, 3] with (T, H, W) per video. - βkH (
Int): Merge kernel height. - βkW (
Int): Merge kernel width. - βmax_h (
Int): Maximum H across all videos (for grid sizing). - βmax_w (
Int): Maximum W across all videos (for grid sizing). - βctx (
DeviceContext): Device context.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!