BF16 Tiling Delivers 1.5x Speedup and 28.5% Energy Cut on A40
The author optimized a 2D seven-point hexagonal Ising lattice simulation on an NVIDIA A40 using BF16 tiling and a unified logic protocol, achieving roughly 1.477x speedup and 28.5% (L=4608) to 27.1% (L=9216) reductions in dynamic energy. The methodology freezes specifications and runs multi-model red-team audits before compiling or renting compute, with NVML energy measurements disclosed.
Full Report
Contents8 sections
SKEW_TILED_BF16 — NVIDIA A40 Receipts & Unified Logic Protocol
Authors: Kristian Lindholm and the AI Orchestra (Coldwater Tractors Inc)
Date: November 16, 2026 | Architecture: NVIDIA A40 (Ampere sm_86, 48 GB GDDR6, 300 W TDP)
Use Restriction: Receipts and methodology open for civilian, academic, and commercial research. Strictly prohibited for kinetic, military, weapons, or targeting applications.
Unified Logic: The Scientific Method for Intelligent Systems
Prior to compiling or renting GPU compute, every architectural and numerical claim was subjected to a multi-model adversarial falsification loop ("Red-Team Audit"):
1. Frozen Pre-Run Specification: Grid sizes (L ∈ {384, 768, 4608, 9216}; updated from 4096/8192 via Patch 5 so L is divisible by 3 × TILE = 96 for seamless 3-color torus wrapping), physics parameters (2D 7-point hexagonal Ising lattice, J = +1, T = 3.0, stateless PCG32 PRNG), and pass/fail gates were locked before first execution.
2. Multi-Model Red-Team Audits: Independent model windows audited shared-memory bank conflicts, wrap-around alignment, multi-sweep pointer hazards, ULP tie drift, and observable bias—catching and resolving 15+ structural and verification edge cases prior to execution.
3. Dual-Track Deterministic Verification: Every run executes two full sweeps (6 sub-lattice color phases) against both an exact FP32 parity track and a double-precision (FP64 std::exp) reference across randomized (±1) and uniform (si = +1) initial states.
1. Compiler & Register Footprint (nvcc -O3 -arch=sm_86 --ptxas-options=-v)
| Kernel Variant | Registers / Thread | Shared Memory | Spills | Gate |
|---|---|---|---|---|
skew_tiled_phase<bf16_t, 38> | 15 registers | 2,584 bytes | 0 bytes | PASS |
skew_tiled_phase<float, 37> | 36 registers | 5,032 bytes | 0 bytes | PASS |
skew_tiled_phase<int8_t, 37> | 36 registers | 1,258 bytes | 0 bytes | PASS |
2. Correctness & Detailed-Balance Gates (2 Sweeps = 6 Sub-Lattice Phases)
| Grid & Initialization | L2(h) / L2(dE) | gpu_f32_diff | dec_f64_rate | |de|/|e| & |dm| | Gate |
|---|---|---|---|---|---|
L = 384 (Random ±1) | 0.0e+00 / 0.0e+00 | 0 | 0.00e+00 | 0.00e+00 / 0.00e+00 | PASS |
L = 384 (Uniform +1) | 0.0e+00 / 0.0e+00 | 0 | 0.00e+00 | 0.00e+00 / 0.00e+00 | PASS |
L = 768 (Random ±1) | 0.0e+00 / 0.0e+00 | 0 | 0.00e+00 | 0.00e+00 / 0.00e+00 | PASS |
L = 768 (Uniform +1) | 0.0e+00 / 0.0e+00 | 0 | 0.00e+00 | 0.00e+00 / 0.00e+00 | PASS |
3. Standalone cudaEvent Throughput (30 Interleaved Trials, 10 Sweeps)
| Lattice Size (L × L) | bf16_t Median (IQR) | fp32 Median (IQR) | int8_t Scalar Ref | Speedup (fp32 / bf16) |
|---|---|---|---|---|
| 4608 × 4608 (21.23M sites) | 10.204 ms (0.005 ms) | 15.291 ms (0.013 ms) | 13.356 ms | 1.499x |
| 9216 × 9216 (84.93M sites) | 40.679 ms (0.015 ms) | 60.064 ms (0.020 ms) | 53.072 ms | 1.477x |
4. Multi-Second Paired ABBA NVML Energy (16 Quads, P_idle = 73.02 W)
| Lattice Size (L × L) | Sweeps / Window | E_dyn (fp32) | E_dyn (bf16) | Dynamic Energy Saved | Total Board Saved |
|---|---|---|---|---|---|
| 4608 × 4608 | 4,500 (~4.6–6.9 s) | 261.164 mJ/sw | 186.735 mJ/sw | 28.5% (1.399x) | ~29.9% |
| 9216 × 9216 | 1,200 (~4.9–7.2 s) | 1083.034 mJ/sw | 788.288 mJ/sw | 27.1% (1.371x) | ~28.8% |
5. Hardware Performance Counter Disclosure (ncu)
UNMETERED PMC Container Hypervisor Restriction (ERR_NVGPUCTRPERM): Low-level hardware performance counters (ncu DRAM byte counters) were blocked by host container permissions on the benchmarked A40 instance. Accordingly, the expected ≥42% DRAM traffic reduction is architecturally inferred from the 2-byte (bf16_t) vs. 4-byte (float) representation and corroborated by the measured 1.499x wall-clock speedup and 28.5% NVML dynamic energy reduction, rather than directly metered via hardware PMC counters.
6. Raw Console Receipt
[Gates 1-3 (rand_init, 2-sw) @ L=384] L2(h)=0.0e+00 L2(dE)=0.0e+00 gpu_f32_diff=0 dec_f64_rate=0.00e+00 |de|/|e|=0.00e+00 |dm|=0.00e+00 (|m|=0.0043)
[Gates 1-3 (unif_init, 2-sw) @ L=384] L2(h)=0.0e+00 L2(dE)=0.0e+00 gpu_f32_diff=0 dec_f64_rate=0.00e+00 |de|/|e|=0.00e+00 |dm|=0.00e+00 (|m|=0.9400)
[Gates 1-3 (rand_init, 2-sw) @ L=768] L2(h)=0.0e+00 L2(dE)=0.0e+00 gpu_f32_diff=0 dec_f64_rate=0.00e+00 |de|/|e|=0.00e+00 |dm|=0.00e+00 (|m|=0.0064)
[Gates 1-3 (unif_init, 2-sw) @ L=768] L2(h)=0.0e+00 L2(dE)=0.0e+00 gpu_f32_diff=0 dec_f64_rate=0.00e+00 |de|/|e|=0.00e+00 |dm|=0.00e+00 (|m|=0.9418)
L=4608 sweeps=10 | bf16 med=10.204ms (IQR 0.005) | fp32 med=15.291ms (IQR 0.013) | int8 med=13.356ms | speedup(fp32/bf16)=1.499x
L=9216 sweeps=10 | bf16 med=40.679ms (IQR 0.015) | fp32 med=60.064ms (IQR 0.020) | int8 med=53.072ms | speedup(fp32/bf16)=1.477x
GPU: NVIDIA A40
Baseline P_idle = 73.02 W
[NVML L=4608 sweeps=4500] E_dyn_fp32=261.164 mJ/sw | E_dyn_bf16=186.735 mJ/sw | Energy ratio=1.399x (28.5% reduction)
[NVML L=9216 sweeps=1200] E_dyn_fp32=1083.034 mJ/sw | E_dyn_bf16=788.288 mJ/sw | Energy ratio=1.371x (27.1% reduction)