nx_f32_layernorm.nx
buildroot/runtime/nx_f32_layernorm.nx
about
nx_f32_layernorm.nx -- clean importable flat-array software-f32 LayerNorm (per-row normalize over `dim`, then
affine): out = (x-mean)/sqrt(var+eps) * gamma + beta. The ecosystem has nx_layernorm_forward (NxTensor) and a
layernorm_fwd embedded in a gate, but no plain importable flat lib -- this is it, the ViT/BERT encoder building
block. Composes nx_f32_add/sub/mul/div/sqrt. license_tier: ORIGINAL
dependencies 4 imports · 3 importers
imports: nx_syscalls.nxnx_f32.nxnx_f32_cvt.nxnx_f32_div.nx
imported by: nx_f32_layernorm_lib_gate.nxnx_vit_encoder_layer.nxnx_vitpose_forward.nx
structs
| none |
consts
| none |
functions
| 11 | func nx_f32_layernorm(x: *i64, gamma: *i64, beta: *i64, n_rows: i64, dim: i64, eps: i64, out: *i64) -> i64 called by 3: mainvit_encoder_layermain calls 6: nx_i32_to_f32nx_f32_addnx_f32_divnx_f32_subnx_f32_mulnx_f32_sqrt |