std1.0.0-beta-7 SafeC docs

std :: ml::gpu_cuda

Function std::cuda_half_maxpool2d

#include <std/ml/gpu_cuda.h> source · definition

int cuda_half_maxpool2d(
    struct CudaHalfBuf x,
    struct CudaHalfBuf y,
    unsigned long batch,
    unsigned long channels,
    unsigned long height,
    unsigned long width,
    unsigned long kernel,
    unsigned long stride,
)

16-bit max / avg pooling on NCHW (x: [batch, channels, height, width]), kernel x kernel window, given stride, no padding: the same windows as gpu_cudnn.h's cuda_maxpool2d. fp32 accumulation, one rounding; max pooling copies the largest value's bits.