Skip to main content

avgpool1d_forward

Function avgpool1d_forward 

Source
pub fn avgpool1d_forward<T: Triton, D: Num, const KL: i32, const STRIDE: i32, const BLOCK_OL: i32>(
    input_ptr: T::Pointer<D>,
    output_ptr: T::Pointer<D>,
    _B: i32,
    C: i32,
    L: i32,
    OL: 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

1-D average-pooling forward pass.

Grid: pid = (b * C + c) * num_ol_tiles + ol_tile

Each CTA sums a BLOCK_OL-wide strip over the KL kernel positions then divides by KL.

Constraints: no padding; OL = (L - KL) / STRIDE + 1.