code wiki / f32

topic: f32

168 modules sharing the f32 name family (derived from the tree's prefix discipline).

Software floating point and its SIMD acceleration: the ecosystem's core is pure-integer by doctrine, and when real workloads need floats (models, media, geometry), this family provides them as library code — conversions, math kernels, and vectorized paths — rather than as a language dependency. Heavily imported by the model-serving and media lanes.

narrated overview -- maintained by the narration lane, module links verified against this wiki.

moduledescriptionlinesfuncs
_f32_intrin_probe.nxR1b proof: NishiLang computing in HARDWARE f32 via the new191
_f32_wat_kat.nxminimal f32 program to verify the sovereign wat path emits hardware f32 (f32.add).51
nx_f32.nxIEEE 754 binary32 (single-precision float) bits-up.62818
nx_f32_activations.nxbits-up f32 ML activation functions.673
nx_f32_activations_test.nxsmoke for nx_f32_activations.nx.752
nx_f32_adaln.nxsoftware-f32 adaptive LayerNorm (adaLN / adaLN-Zero) modulation, the DiT-specific brick.1083
nx_f32_adam_gate.nx967
nx_f32_attention.nxsoftware-f32 multi-token scaled-dot-product attention (single head), the first1042
nx_f32_attn_cached.nxbits-up f32 multi-head attention with KV cache.1512
nx_f32_attn_cached_test.nxsmoke for nx_f32_attn_cached.nx.1021
nx_f32_attn_charlm_gate.nx26015
nx_f32_attn_multi.nxbits-up f32 multi-token attention kernel.1372
nx_f32_attn_multi_test.nxsmoke for nx_f32_attn_multi.nx.902
nx_f32_attn_paged.nxPAGED-KV attention: the paged twin of1001
nx_f32_autograd_gate.nx10911
nx_f32_block_gate.nx12512
nx_f32_bn_fold.nxfold inference BatchNorm into the PRECEDING conv's weights + bias (offline), so a ResNet/291
nx_f32_bn_fold_gate.nxproof of BN-fold: exact folded W'/b', AND functional equivalence foldedconv(in) ==603
nx_f32_bpe_load.nxload BPE tokenizer vocabulary from GGUF.1824
nx_f32_bpe_load_test.nxsmoke for nx_f32_bpe_load.nx.1242
nx_f32_charlm_train_gate.nx28817
nx_f32_conv2d.nxsoftware-f32 multi-channel 2D convolution (NCHW), the R3 vision-op re-tier.1292
nx_f32_conv2d_backward.nxthe GRADIENT of the software-f32 2D convolution: the backward of891
nx_f32_conv2d_backward_fast.nxFAST conv2d backward via im2col + the fork-parallel nx_f32_matmul_t, the1091
nx_f32_conv2d_backward_fast_gate.nxproves nx_f32_conv2d_backward_fast == nx_f32_conv2d_backward (bit-exact on555
nx_f32_conv2d_backward_gate.nxEXACT gradient check of nx_f32_conv2d_backward. Integer-valued inputs/weights783
nx_f32_conv2d_fast.nxFAST software-f32 conv2d (NCHW) via im2col + the FORK-PARALLEL nx_f32_matmul_t. The781
nx_f32_conv2d_fast_gate.nxproves nx_f32_conv2d_fast == nx_f32_conv2d_forward (bit-exact on integer values,564
nx_f32_conv2d_grouped.nxsoftware-f32 GROUPED 2D convolution (NCHW), generalizing nx_f32_conv2d with a811
nx_f32_conv2d_grouped_gate.nxexact proof of grouped conv: depthwise (groups=C_in), a 2-group case, dense633
nx_f32_conv_train_gate.nxproves the SOVEREIGN conv TRAINING LOOP converges end-to-end: forward1083
nx_f32_conv_transpose2d.nxsoftware-f32 2D TRANSPOSED convolution / deconv (NCHW), a STANDARD vision op the861
nx_f32_conv_transpose2d_gate.nxexact proof of transposed conv: kernel-spread of a single pixel, stride-2533
nx_f32_crossentropy_gate.nx11310
nx_f32_cvt.nxIEEE 754 binary32 conversions (bits-up).3048
nx_f32_cvt_test.nxsmoke for nx_f32_cvt.nx.611
nx_f32_dit_block_linear.nxSANA-style DiT block using LINEAR attention (the efficient Z-Image DiT unit).1917
nx_f32_dit_block_simd.nxSANA-DiT block with SIMD (__f32x8_dot) projections: the end-to-end fast unit.2078
nx_f32_dit_block_tiny.nxfirst sovereign f32 DiT (Diffusion Transformer) BLOCK, assembled from the1694
nx_f32_div.nxIEEE 754 binary32 division (standalone).1171
nx_f32_div_test.nxsmoke for nx_f32_div.nx.291
nx_f32_embed_gate.nxKAT for the NEURAL EMBEDDING TAP (rung 1 of the retrieval ladder).1555
nx_f32_embed_lmhead_gate.nx16111
nx_f32_encode.nxthe ENCODE half of f32: integer value -> IEEE-754 single432
nx_f32_encode_test.nxKAT gate: integer -> IEEE-754 single bit pattern,414
nx_f32_exp.nxIEEE 754 binary32 exp(x) bits-up.1773
nx_f32_exp_test.nxsmoke for nx_f32_exp.nx.562
nx_f32_ffn_path_gate.nxISOLATED, host-noise-immune proof that the1186
nx_f32_gelu.nxsoftware-f32 EXACT GELU (erf-based, matching PyTorch nn.GELU default / HF "gelu"), the one573
nx_f32_gelu_gate.nxproof of exact GELU vs known PyTorch values (tolerance 1e-3). expect_exit: 0413
nx_f32_gqa_attention.nxsoftware-f32 Grouped-Query multi-head attention (Ainslie 2023 GQA).1032
nx_f32_gqa_gate.nx11010
nx_f32_groupnorm.nxsoftware-f32 Group Normalisation (Wu & He 2018), the R3 vision-op re-tier.1463
nx_f32_hw.nxHARDWARE IEEE-754 f32 for NishiLang via the __f32_* compiler intrinsics9717
nx_f32_hw_matmul.nxHARDWARE-float GEMM (the rung above the software nx_f32_matmul).674
nx_f32_hw_matmul_curve.nxdiagnose the matmul bottleneck (compute- vs memory-bound).563
nx_f32_hw_matmul_gate.nxproves the hardware-float GEMM is correct.944
nx_f32_hw_matmul_mac4.nxILP matmul: 4 independent accumulators hide the addss latency.973
nx_f32_hw_matmul_perf.nxMEASURED head-to-head: software vs hardware f32 GEMM (both sovereign).583
nx_f32_image_to_bmp.nxsovereign 24-bit BMP writer: f32 CHW RGB [0,1] -> a Windows-viewable .bmp file.1283
nx_f32_intrin_matmul.nxis the matmul bottleneck CALL OVERHEAD (wrapper) vs the inline intrinsic?1034
nx_f32_kv_cache.nxbits-up f32 KV cache substrate.1628
nx_f32_kv_cache_test.nxsmoke for nx_f32_kv_cache.nx.1181
nx_f32_layernorm.nxclean importable flat-array software-f32 LayerNorm (per-row normalize over `dim`, then341
nx_f32_layernorm_gate.nx1349
nx_f32_layernorm_lib_gate.nxproof of the flat LayerNorm vs hand-computed values + affine + 2-row. expect_exit: 0553
nx_f32_lazy_weight.nxformat-tagged weight tensor + matmul dispatcher.88630
nx_f32_lazy_weight_test.nxsmoke for nx_f32_lazy_weight.nx.1292
nx_f32_linear_attention.nxsovereign O(n) linear attention (SANA-style), the DiT VRAM/speed lever.1034
nx_f32_linear_simd.nxSIMD f32 linear (__f32x8_dot) for the SANA-DiT projections, vs scalar: verify+speed.1304
nx_f32_llama_block.nxbits-up Llama-class transformer block2383
nx_f32_llama_block_test.nxsmoke for nx_f32_llama_block.nx.1291
nx_f32_llama_block_v4.nxper-layer forward with lazy weights.38912
nx_f32_llama_block_v4_test.nxsmoke for nx_f32_llama_block_v4.nx.1011
nx_f32_llama_layer_lazy_load.nxbind one layer's 9 tensors into3235
nx_f32_llama_layer_lazy_load_test.nxsmoke for the lazy-aware681
nx_f32_llama_layer_load.nxbind one layer's 9 GGUF tensors into NxF32LlamaLayer.1924
nx_f32_llama_layer_load_test.nxsmoke for nx_f32_llama_layer_load.nx.681
nx_f32_llama_stack.nxmulti-block transformer stack forward.1212
nx_f32_llama_stack_test.nxsmoke for nx_f32_llama_stack.nx.1202
nx_f32_llama_stack_v4.nxN-layer transformer stack using v4 lazy layers.962
nx_f32_llama_stack_v4_test.nxsmoke for v4 stack.1032
nx_f32_llama_v4b.nxBATCHED MULTI-SEQUENCE decode twins: one forward3443
nx_f32_llama_v4p.nxPAGED-KV twins of the v4 forward chain: block /3483
nx_f32_llm.nxfull Llama-class model forward pass.1584
nx_f32_llm_bench_test.nxparked LIVE-FIRE perf harness for real Qwen2.5.1772
nx_f32_llm_chat_test.nxSOVEREIGN CHAT HARNESS: the decisive coherence test. Qwen2.5-Instruct is trained1285
nx_f32_llm_cohere_test.nxSOVEREIGN COHERENCE HARNESS: the tool that answers "is the engine actually1183
nx_f32_llm_diag_test.nxenumerate all tensor ggml_types in1372
nx_f32_llm_dim_dump_test.nxdump attn_k.weight tensor dimensions1012
nx_f32_llm_e2e_test.nxend-to-end bits-up text-to-text smoke.1051
nx_f32_llm_embed_diag_test.nxcheck Q5_0-dequanted embed values951
nx_f32_llm_live_dims_test.nxLIVE FIRE on the real Qwen2.5-0.5B-Instruct.621
nx_f32_llm_live_gen_test.nxLIVE-FIRE TEXT GENERATION from real1161
nx_f32_llm_live_load_only_test.nxLIVE-FIRE structural load851
nx_f32_llm_live_load_test.nxLIVE-FIRE structural proof.1451
nx_f32_llm_load.nxmodel-level GGUF binder.1292
nx_f32_llm_load_test.nxsmoke for nx_f32_llm_load.nx.921
nx_f32_llm_probe.nxSOVEREIGN FORWARD PROBE: the tool that turns "why is the LLM forward garbage?"1675
nx_f32_llm_read_dims.nxread model dims from GGUF metadata.2365
nx_f32_llm_read_dims_test.nxsmoke for nx_f32_llm_read_dims.nx.1693
nx_f32_llm_run.nxautoregressive generation loop runner.1552
nx_f32_llm_run_test.nxsmoke for nx_f32_llm_run.nx.1111
nx_f32_llm_run_v2.nxproduction runner with full sampler config.2155
nx_f32_llm_run_v2_test.nxsmoke for nx_f32_llm_run_v2.nx.1031
nx_f32_llm_run_v3.nxlazy-aware autoregressive runner.1894
nx_f32_llm_run_v3_test.nxsmoke for lazy runner v3.631
nx_f32_llm_serve.nxthe SOVEREIGN LLM generation SEAT. Loads real Qwen2.5-0.5B GGUF ONCE at startup, binds35112
nx_f32_llm_special_tokens.nxread BOS/EOS/PAD token ids from GGUF.744
nx_f32_llm_special_tokens_test.nxsmoke for nx_f32_llm_special_tokens.nx.1022
nx_f32_llm_test.nxsmoke for nx_f32_llm.nx.1522
nx_f32_llm_v4.nxlazy-aware model binder + LLM forward.2885
nx_f32_llm_v4_test.nxsmoke for the lazy LLM forward.891
nx_f32_lm_train_gate.nx13210
nx_f32_log.nxIEEE 754 binary32 natural-log log(x) bits-up.1101
nx_f32_log_test.nxsmoke for nx_f32_log.nx.602
nx_f32_lora_linear.nxsovereign LoRA-adapted linear (the Aligned-LoRA / fine-tune-fewer-images lever).983
nx_f32_matmul.nxbits-up f32 dot product + GEMM kernel.783
nx_f32_matmul_gate.nxKAT proving the SOVEREIGN f32 GEMM is correct (the math-axis foothold).916
nx_f32_matmul_perf.nxMEASURE the sovereign f32 GEMM's throughput (the math-perf rung).644
nx_f32_matmul_t.nxmatmul where B is laid out per ggml convention (B[k,j] at B[k + j*K]).2427
nx_f32_matmul_t_test.nxKAT for column-major-B matmul.451
nx_f32_matmul_test.nxsmoke for nx_f32_matmul.nx.1022
nx_f32_maxpool2d.nxsoftware-f32 2D max-pooling (NCHW), a STANDARD vision op the f32 tower lacked. Almost every611
nx_f32_maxpool2d_gate.nxexact proof of nx_f32_maxpool2d on an integer-f32 4x4 map. expect_exit: 0523
nx_f32_mha.nxbits-up f32 multi-head attention with GQA.1442
nx_f32_mha_multi.nxbits-up f32 multi-head + multi-token attention.1402
nx_f32_mha_multi_test.nxsmoke for nx_f32_mha_multi.nx.911
nx_f32_mha_test.nxsmoke for nx_f32_mha.nx.921
nx_f32_miniqwen_train_gate.nx25814
nx_f32_moe_train_gate.nx25722
nx_f32_parity.nxdifferential-parity measurement organ: the MEASURED-EXCEED engine for the702
nx_f32_q14_encode_test.nxKAT gate for f32_from_q14, the EXACT Q14->IEEE-754756
nx_f32_q4k_matmul.nxlazy-dequant matmul, B is Q4_K bytes. C[m,n] = A[m,k] @ dequant(B[k,n]).71624
nx_f32_q4k_matmul_test.nxsmoke for nx_f32_q4k_matmul.nx.1413
nx_f32_qwen2_train_gate.nx32429
nx_f32_qwen_capital_gate.nxLIVE-FIRE TEXT GENERATION from real1191
nx_f32_qwen_encoder.nxstack the sovereign Qwen layer into the FULL encoder forward.2333
nx_f32_qwen_layer.nxa FULL sovereign f32 Qwen transformer layer (the Z-Image text-encoder + companion2446
nx_f32_raster_gate.nxR4: the FIRST visible hardware-f32 3D artifact. Renders a rotated,22213
nx_f32_rectflow_denoise.nxsoftware-f32 rectified-flow (flow-matching) Euler denoise loop.1112
nx_f32_resblock.nxsoftware-f32 ResBlock (GroupNorm->SiLU->Conv 3x3, twice, + residual), R3/R7 rung.1023
nx_f32_rmsnorm.nxbits-up f32 RMSNorm.862
nx_f32_rmsnorm_rope_gate.nx13312
nx_f32_rmsnorm_test.nxsmoke for nx_f32_rmsnorm.nx.872
nx_f32_rope.nxbits-up f32 RoPE (Rotary Position Embedding).1865
nx_f32_rope_test.nxsmoke for nx_f32_rope.nx.802
nx_f32_sampler.nxtemperature + top-k sampler for LLM logits.3449
nx_f32_sampler_test.nxsmoke for nx_f32_sampler.nx.1851
nx_f32_sincos.nxIEEE 754 binary32 sin(x) + cos(x) bits-up.1917
nx_f32_sincos_test.nxsmoke for nx_f32_sincos.nx.502
nx_f32_softmax.nxbits-up f32 numerically-stable softmax.873
nx_f32_softmax_gate.nx12311
nx_f32_softmax_test.nxsmoke for nx_f32_softmax.nx.742
nx_f32_sse_kat_gate.nxSOVEREIGN hardware IEEE-754 f32 scalar run-KAT: the1567
nx_f32_swiglu_gate.nx879
nx_f32_test.nxsmoke + IEEE 754 conformance for nx_f32.nx.1611
nx_f32_train_ckpt_gate.nx17319
nx_f32_train_ops.nxthe small reusable software-f32 TRAINING ops that close the conv training loop, composing474
nx_f32_transformer.nxbits-up f32 Llama-class transformer block1892
nx_f32_transformer_test.nxintegration smoke.1011
nx_f32_transformer_train_gate.nx15315
nx_f32_upsample.nxsoftware-f32 nearest-neighbour Nx upsample (NCHW), VAE-decode brick.752
nx_f32_upsample_bilinear.nxsoftware-f32 BILINEAR upsample (NCHW, integer scale, align_corners=FALSE to match801
nx_f32_upsample_bilinear_gate.nxexact proof of bilinear upsample (align_corners=False) vs hand-computed483
nx_f32_vae_decode_tiny.nxfirst end-to-end sovereign f32 VAE-DECODE (latent -> RGB), the R4/R71183
nx_f32_vec_gate.nxKAT for the hardware-f32 vec3 PART (R3), built + run through the611
nx_f32_voxel_gate.nxR4b/R4c: a PERSPECTIVE, TEXTURED, Z-BUFFERED procedural voxel LANDSCAPE on the26022