ShardNet
ResearchMain site ↗
SN-LAB-001 · Live experiment

Poisson equation / mixed-precision iterative refinement.

A minimal scientific-computing experiment that asks a precise question: can a lower-precision inner solve recover the high-precision answer when the outer residual remains high precision?

Problem

2D Poisson boundary-value problem

−∇²u = f   on Ω=[0,1]²
u = 0   on ∂ΩMATRIX-FREE 5-POINT FINITE-DIFFERENCE STENCIL

The default 64×64 grid has 3,844 interior unknowns. The source contains two localized terms plus a smooth sinusoidal component so the solution is not a one-mode toy.

Method

Three paths, one contract

  • Float64 CG establishes the reference.
  • Float32 CG uses Math.fround to force low-precision arithmetic in the browser demonstration.
  • Mixed iterative refinement computes the outer residual in Float64 while solving corrections with Float32 CG.

The promoted metric is numerical accuracy, not browser runtime. Browser timing is intentionally excluded.

Implementation self-test

Implementation qualification receipt

PATHREL. RESIDUALERROR VS FP64ROLE
Float64 CG8.69e-13referencereference
Float32 CG6.56e-56.91e-7low-precision baseline
Mixed IR7.59e-136.46e-13recovery path
ENVIRONMENT
Node.js v24.3.0 · V8 13.6.233.10-node.18 · win32 x64
accelerator: none

LIMIT
implementation self-test only; not a GPU benchmark
Next hardware step

Move the same numerical contract to ROCm.

SN-LAB-003 carries this problem class into a physical AMD Instinct run. The reference residual and solution error remain the gate; only then do wall time, memory traffic, and hardware counters matter.