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 module
pool
Provides average- and max-pooling kernels with configurable padding, dilation, and stride for CPU and GPU.
Structsβ
- β
PoolMethod: Represents the pooling method, selecting between max and average pooling.
Functionsβ
- β
avg_pool: Dispatches the average pooling operation to the CPU or GPU backend based on the target. - β
avg_pool_cpu: Computes the average pool. - β
avg_pool_gpu: Computes the average pool on GPU. - β
max_pool: Dispatches the max pooling operation to the CPU or GPU backend based on the target. - β
max_pool_cpu: Computes fp32 pooling. - β
max_pool_gpu: Computes max pooling on GPU. - β
pool_shape: Computes the output shape of a pooling operation using floor rounding for the spatial dimensions. - β
pool_shape_ceil: Computes the output shape of a pooling operation using ceil rounding for the spatial dimensions. - β
pool_shape_impl: Compute the output shape of a pooling operation, and assert the inputs are compatible. Works for 2D pool operations only in the NHWC format.