code wiki / (root) / nx_f32_conv2d_backward.nx

nx_f32_conv2d_backward.nx

buildroot/runtime/nx_f32_conv2d_backward.nx

4455 B89 linesdepth 3pulls 3 transitivereach 7 importersview sourcekind librarytopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_conv2d_backward.nx -- the GRADIENT of the software-f32 2D convolution: the backward of nx_f32_conv2d_forward. From dL/dOut it computes dL/dInput, dL/dWeight, dL/dBias. This is the ONE training primitive the sovereign ML substrate lacked for CONV nets -- the autograd/Adam/cross-entropy tower (nx_nofloat_autograd, nx_f32_adam, nx_ta_transformer_gradcheck) was matmul/attention-only -- so it is the first brick of TRAINING our own sovereign pose net (operator: "build 2"). Same NCHW layout + stride/pad index math as the forward, exact-mirrored: every (n,co,oh,ow,ci,kh,kw) that contributed input[in_idx]*weight[wt_idx] to out now scatter-adds dout*input into dweight, dout*weight into dinput, and dout into dbias. Composes ONLY nx_f32_mul / nx_f32_add (no libm). Gradient-CHECKED by nx_f32_conv2d_backward_gate (exact integer-f32 gradients, no tolerance). license_tier: ORIGINAL

dependencies 2 imports · 7 importers

nx_syscalls.nx nx_f32.nx nx_f32_conv2d_backward.nx nx_conv_bwd_stride_gate.nx nx_f32_conv2d_backward_fast_gate.n nx_f32_conv2d_backward_gate.nx nx_f32_conv_train_gate.nx nx_pose_backprop_gate.nx nx_pose_distill_gate.nx nx_pose_student_distill.nx

imports: nx_syscalls.nxnx_f32.nx

imported by: nx_conv_bwd_stride_gate.nxnx_f32_conv2d_backward_fast_gate.nxnx_f32_conv2d_backward_gate.nxnx_f32_conv_train_gate.nxnx_pose_backprop_gate.nxnx_pose_distill_gate.nxnx_pose_student_distill.nx

structs

none

consts

13const NX_F32CVB_OK: i64 = 0
14const NX_F32CVB_ERR_BAD_ARGS: i64 = 4

functions

18func nx_f32_conv2d_backward(input: *i64, N: i64, C_in: i64, H: i64, W: i64,