code wiki / (root) / nx_f32_maxpool2d.nx

nx_f32_maxpool2d.nx

buildroot/runtime/nx_f32_maxpool2d.nx

2538 B61 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind librarytopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_maxpool2d.nx -- software-f32 2D max-pooling (NCHW), a STANDARD vision op the f32 tower lacked. Almost every CNN stem (ResNet/HRNet pose backbones) does a 3x3 stride-2 maxpool after the first conv; the pose port needs it. Padding positions are EXCLUDED from the max (standard maxpool: pad with -inf, i.e. never selected). Composes only nx_f32_gt (IEEE-754 magnitude compare), so it is correct for any f32 (unlike raw bit compare on negatives). license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_f32.nx nx_f32_maxpool2d.nx nx_f32_maxpool2d_gate.nx

imports: nx_syscalls.nxnx_f32.nx

imported by: nx_f32_maxpool2d_gate.nx

structs

none

consts

9const NX_MP_OK: i64 = 0
10const NX_MP_ERR_ARGS: i64 = 4

functions

13func nx_f32_maxpool2d(input: *i64, N: i64, C: i64, H: i64, W: i64, KH: i64, KW: i64, stride: i64, pad: i64, out: *i64) -> i64
called by 1: main calls 1: nx_f32_gt