For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
tpool_patch_merger
def tpool_patch_merger[dtype: DType, output_layout: TensorLayout, x_layout: TensorLayout, bounds_layout: TensorLayout, OutputEngine: TensorEngine = DefaultEngine, XEngine: TensorEngine = DefaultEngine, BoundsEngine: TensorEngine = DefaultEngine](output: TileTensor[dtype, output_layout, MutAnyOrigin, Engine=OutputEngine], x: TileTensor[dtype, x_layout, ImmutAnyOrigin, Engine=XEngine], bounds: TileTensor[.int64, bounds_layout, ImmutAnyOrigin, Engine=BoundsEngine], 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. - OutputEngine (
TensorEngine): Engine of the output tensor. - XEngine (
TensorEngine): Engine of the input tensor. - BoundsEngine (
TensorEngine): Engine of the bounds tensor.
Args:
- output (
TileTensor[dtype, output_layout, MutAnyOrigin, Engine=OutputEngine]): Contiguous output tensor [total_output_patches, D]. - x (
TileTensor[dtype, x_layout, ImmutAnyOrigin, Engine=XEngine]): Input tensor [n_tokens, D]. - bounds (
TileTensor[.int64, bounds_layout, ImmutAnyOrigin, Engine=BoundsEngine]): 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.