Skip to main content

maxpool2d_forward

Function maxpool2d_forward 

Source
pub fn maxpool2d_forward<T: Triton, D: Num, const KH: i32, const KW: i32, const STRIDE_H: i32, const STRIDE_W: i32, const PAD_H: i32, const PAD_W: i32, const BLOCK_OW: i32>(
    input_ptr: T::Pointer<D>,
    output_ptr: T::Pointer<D>,
    _B: i32,
    C: i32,
    H: i32,
    W: i32,
    OH: i32,
    OW: i32,
)
where T::I32Tensor: Tensor<i32, 1> + Comparison<i32, BoolTensor = T::BoolTensor>, T::Pointer<D>: AddOffsets<i32, 1, T::I32Tensor, Output = T::Tensor<T::Pointer<D>>>,
Expand description

2-D max-pooling forward pass with optional symmetric padding.

Grid: pid = ((b * C + c) * OH + oh) * num_ow_tiles + ow_tile

OH = (H + 2*PAD_H - KH) / STRIDE_H + 1, OW = (W + 2*PAD_W - KW) / STRIDE_W + 1.