Mojo function
tpool_patch_merger
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.
Args:
- output (
TileTensor): Contiguous output tensor [total_output_patches, D]. - x (
TileTensor): Input tensor [n_tokens, D]. - bounds (
TileTensor): 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!