Measured

GPU solvers, measured against the CPU

The kernel's solvers run on the CPU by default, and the CPU result is the reference. Where a loop is shaped for a graphics card, the same solver also runs as WebGPU compute shaders. This page lists every one of those paths: what runs on the device, what stays on the host, the before and after wall times, how closely the device matches the CPU, and where it stops.

69.1 s → 1.56 sThe default wind tunnel solve (staircase grid, k-ε, grid 42, 60 steps): CPU, then the whole step on the GPU. Drag coefficient 1.2671 and 1.2672. GPU record §6n
232.2 s → 7.0 sFlat plate validation record, cut cells, 600 steps: momentum on the host, then the whole step on the GPU. Drag coefficient 1.1965 both times. GPU record §6y
2,000 against 2-3Million lattice updates a second in the lattice-Boltzmann core: the GPU, then one CPU thread running the same scheme. LBM record, validation

Unless a row says otherwise, everything here was measured on one desktop: Intel Core Ultra 5 225F (10 cores), NVIDIA RTX 5060 with 8 GB, D3D12, WebGPU addon 0.6.1. GPU record §6

How to read the numbers

Incompressible flow on a staggered grid, pressure projection, staircase or cut-cell bodies

Steady wind tunnel

On by default when the machine has a GPU

The wind tunnel tool solves on the GPU whenever the host has one, and on the CPU otherwise. The fields go up once, stay on the device for the whole run, and come back once for the forces and exports.

On the GPU

  • Advection: semi-Lagrangian nearest-cell, trilinear and MacCormack
  • Diffusion: explicit, and implicit as three conjugate-gradient solves a step
  • The pressure projection: assembly, the solve, and the velocity correction
  • Pressure solvers: multi-colour SOR, Jacobi CG, and multigrid-preconditioned CG
  • Turbulence transport: k-ε and k-ω SST, with their wall functions
  • Cut-cell wall shear and aperture-weighted cut-cell momentum
  • Tunnel walls, moving walls, the slip and open far fields
  • The per-step residuals, read back as a handful of numbers

On the CPU

  • Tessellating and voxelising the body
  • Building the cut cells, the pressure system's structure and colouring, and the multigrid hierarchy (once per geometry, then cached)
  • Force integration and exports, on the fields fetched after the loop
  • Samplers such as force averaging and transient frames: they fetch only the parts they read, on the steps they read them
One case, slice by slice
Best CPU run (multigrid CG)154.7 s
Pressure solve and advection on the device19.6 s
The whole projection on the device14.5 s
Momentum terms in one call10.6–10.9 s
Fields resident for the whole loop4.9–5.1 s
Colour-ordered rows, batched convergence checks3.83–3.97 s
Faster cut-cell setup on the host2.25–3.09 s

Face-on cube, cut cells, laminar, converged, grid 42 (about a million pressure rows), 60 steps. Whole-solve wall time as each part moved to the device. Where the record gives a range, the bar is drawn at the slower end. GPU record §6c GPU record §6d GPU record §6e GPU record §6f GPU record §6g

Whole solve: the CPU, then the resident GPU step
CaseCPUGPUCd, CPUCd, GPUSource
Default solve: staircase grid, k-ε, grid 28, 60 steps18.9 s0.73 s1.23321.2332GPU record §6n
Default solve at grid 42, 60 steps69.1 s1.56 s1.26711.2672GPU record §6n
Cut cells, k-ε, grid 42, 60 steps144 s3.1 s1.10811.1080GPU record §6l
Cut cells, laminar, multigrid CG, grid 42, 60 steps142.7 s2.70–2.73 s1.07221.0724GPU record §6h
k-ω SST, staircase grid, grid 42, 60 steps73.6 s1.59 s1.23871.2381GPU record §6o
Moving walls (a sliding top face and a spinning front face), k-ε, grid 42, 60 steps70.5 s1.61 s1.25141.2512GPU record §6p
Open far field, k-ε, grid 42, 60 steps12.9 s0.61 s1.17301.1729GPU record §6q
Open far field, multigrid CG, grid 42, 60 steps13.0 s0.83 s1.17281.1728GPU record §6s
Trilinear advection, k-ε, grid 42, 60 steps99.9 s1.67 s1.19931.1994GPU record §6t
Implicit diffusion, k-ε, grid 42, 60 steps (see the limits below)163.5 s2.7 s1.23331.2368GPU record §6v
MacCormack advection, k-ε, grid 42, 60 steps (see the limits below)282 s1.8 s1.25491.2470GPU record §6u

Face-on cube unless the row says otherwise. Cd is the drag coefficient.

Validation records with aperture-weighted cut-cell momentum, 600 steps
BodyGridCd, bothMomentum on the hostWhole step on the GPUSource
Cube64 x 24 x 720.939918.8 s1.8 sGPU record §6y
Sphere64 x 24 x 720.535016.7 s1.8 sGPU record §6y
Cylinder64 x 120 x 320.795762.2 s3.4 sGPU record §6y
Flat plate115 x 49 x 1451.1965232.2 s7.0 sGPU record §6y

Both columns already solve the pressure on the GPU. One keeps the momentum terms on the host every step; the other runs the whole step on the device. The four records are identical in every coefficient digit they print.

The pressure solve alone, cut cells, 20 steps
GridBest CPU solverGPUCd, bothSource
288.70 s0.54 s1.1896GPU record §6
4247.1 s2.35 s1.3211GPU record §6

The CPU column is the fastest CPU solver for this system, multigrid-preconditioned CG. The GPU column is multi-colour SOR to the same tolerance. This is a kernel timing, not a whole solve.

How closely the device matches

  • Each kernel's CPU twin runs the same sequence in 64-bit floats. A resident run on the twin reproduces the CPU solve to the bit: drag, lift, every residual and the divergence.
  • On the real device, a grid-42 advection call matches the CPU on all 3.39 M faces to 2.4e-7 of the peak speed, and the resident fields agree with the twin to 4e-7. GPU record §6l
  • Aperture-weighted momentum: five steps from a developed flow round a sphere match the twin to 6.2e-7 of the peak velocity and of the pressure range, and a 60-step grid-36 solve reads Cd 0.5596 on the host and on the device. GPU record §6y
  • The live-device tests run on a real adapter and skip, saying so, on a machine without one. The same kernels are also run in continuous integration on an emulated device.

Limits

  • Single precision has a floor. The device's conjugate-gradient solve now reports its true residual and says when it has stalled: in a grid-64 tunnel run at the default tolerance of 1e-6, 115 of 120 solves stop short, the worst at 5.9e-6. The drag does not move (0.9898 before and after the change). GPU record §6w
  • Measured and not built: taking the solve below that floor with a higher-precision residual. At grid 64 the device at its floor and a 64-bit CPU solve at a true 1e-6 give the same drag, 1.0369, and that CPU solve took 52 minutes against 40 seconds on the device. Not measured there: the divergence after the projection, a 64-bit CPU solve at grid 128, and tolerances tighter than 1e-6. GPU record §6x
  • Chaotic cases drift. At grid 42 the 60-step MacCormack solve amplifies rounding: the device follows the CPU to four digits early in the run and then departs from it, as a CPU run does when its inlet speed is nudged by one part in a million (Cd 1.2549 becomes 1.2521). The implicit-diffusion row shows the same behaviour. GPU record §6u
  • Still on the host step: the untransported turbulence closures, and aperture-weighted momentum combined with trilinear or MacCormack advection, implicit diffusion, thin walls or refinement blocks. The run says why it stayed on the host.
  • Not routed to the GPU at all: transient, internal-flow, compressible and dry-run calls.
  • Small cases gain little. Through the tool server, a default solve at grid 20 over 10 steps took 1.9 s on the GPU route against 3.9 s on the CPU. GPU record §6l
  • A repeat call on the same geometry reuses the setup: 1.12 s for the initial call and 0.36 s for the repeat (cut cells, k-ε, 10 steps round a sphere at grid 42). GPU record §6r
  • Size on this card: the largest resident run on the RTX 5060 held 17.83 M cells, 20 steps in 3.96 s after a 6.6 s session open, in about 6.1 GB of device memory. The larger cell budget is opt-in, because finer cells changed the answers on a thin-walled test case. device budget notes
  • With no device the call runs on the CPU. If the device is lost mid-run, the solve is rerun without residency and the result says so.

D3Q19 lattice, regularized collision, Smagorinsky sub-grid model, for unsteady external flow

Lattice-Boltzmann large-eddy core

Runs on the device when one is present; the CPU solver is the oracle

The whole time step is one fused stream-and-collide pass on the device, with the walls, loads and boundaries in the same pass. Without a device the caller runs the CPU solver of the same scheme.

On the GPU

  • Fused stream-collide on one population set, streamed in place
  • Regularized collision with the Smagorinsky term and a separate bulk relaxation
  • Interpolated bounce-back walls, with the exact link fraction taken from the triangle mesh
  • Wall loads by momentum exchange
  • Far-field, outlet, symmetry and prescribed-velocity boundaries, and the absorbing sponges
  • Refinement patches: a fine lattice over a box of the coarse one, coupled both ways

On the CPU

  • Turning the meshes into lattice nodes and link fractions
  • The CPU solver of the same scheme, which every device result is tested against
Validation on the RTX 5060 (8 GB)
CheckResultGateSource
CPU against GPU, 64^3 box with a sphere, 200 stepslargest velocity difference 3.2e-6 of the free stream, wall force 5e-61e-4LBM record, validation
Speedabout 2,000 MLUPS on the GPU, 2-3 MLUPS on one CPU thread20xLBM record, validation
Sphere at Reynolds number 100, 24 cells acrossCd 1.121; the published correlation gives 1.087within 5 % of the referenceLBM record, validation

MLUPS is million lattice updates a second. These rows are from the two-set core that fitted this card; the in-place core that replaced it was validated on a larger card, below.

On a larger card: RTX 3090 (24 GB), one population set in place
Check32-bit storage16-bit, IEEE half16-bit, customSource
CPU against GPU, 64^3 box, 200 steps, largest velocity difference2.73e-61.46e-36.39e-4LBM record, larger card
MLUPS at 64^33,1781,8461,473LBM record, larger card
Sphere at Reynolds number 100, Cd (reference 1.087)1.12081.13661.1307LBM record, larger card

A different machine from the rest of this page. Storage is 32-bit floats or one of two 16-bit formats; arithmetic is 32-bit in every case.

How closely the device matches

  • The 32-bit device run tracks the 64-bit CPU solver to a few parts in a million over 200 steps (3.2e-6 on velocity, 5e-6 on the wall force), against a gate of 1e-4. LBM record, validation
  • Refinement patches on a real device: every coarse and fine population within 9.6e-8 of the CPU, measured on the RTX 3090. LBM record, refinement

Limits

  • Memory sets the box. The two-set core held about 34.5 M nodes (5.4 GB) on the RTX 5060. The in-place core needs 80 bytes a node in 32-bit storage or 42 in 16-bit, and on the 24 GB card ran 500 M nodes in 16-bit storage. LBM record, memory
  • 16-bit storage is for pictures and for boxes that fit no other way. On the airliner approach case the drag and the mean flow stay inside the scatter of a 32-bit control run, but the mean lift does not: CL 0.2114 and 0.2011 in the two 16-bit formats against 0.1825 in 32-bit. Use 32-bit storage for forces. LBM record, 16-bit storage
  • Refinement patches run in 32-bit storage only, and a wall model on a fine lattice is refused by name.

Finite volume on uniform blocks, shock capturing, immersed bodies from a signed-distance field

Compressible Euler solver

Built and emulation-tested; its GPU speed has not been measured

The same scheme as the CPU solver, written operation for operation in six shader modules, so the two backends differ only in 32-bit against 64-bit arithmetic. The default backend picks the GPU when a device exists and the case uses only ported features.

On the GPU

  • Face fluxes: reconstruction with the limiter, positivity scaling and the approximate Riemann solver
  • The three-stage time update, with a validity flag per cell
  • The local time step and the steady residual
  • Boundary ghosts: outflow, slip wall, periodic, fixed inflow and far field
  • The immersed-boundary ghost fill, with or without the curvature term
  • One submit and one small readback a step

On the CPU

  • Inflow states given as functions of position and time
  • The conservative immersed-boundary correction
  • Viscous blocks and adaptive-refinement blocks
  • Runs that ask for a per-step callback
32-bit emulation of the kernels against the 64-bit CPU solver
CaseDifferenceSource
One step, 2-D and 3-D, every boundary type and limiter5e-8 to 8e-8Compressible record, GPU backend
Shock tube, 400 cells, 351 steps3.2e-6 / 8.2e-6 / 3.2e-6Compressible record, GPU backend
Sphere at Mach 3, quarter domain, 160 iterations6.5e-7 / 6.6e-7 / 5.1e-7Compressible record, GPU backend
2-D cylinder with the curvature wall, 150 iterations1.6e-6Compressible record, GPU backend

Relative L1 difference of density / momentum / energy. These come from an emulator that rounds every 32-bit operation, not from a graphics driver.

How closely the device matches

  • The kernels' real shader text is parsed, checked against the shader language's rules and compiled to code that rounds every 32-bit operation; the tests run that against the 64-bit solver.

Limits

  • No speed-up is claimed. The CPU runs about 0.8-1.0 M cells a second on one thread; the GPU figure has not been measured, and the benchmark never estimates one. Compressible record, GPU backend
  • An emulator is not a driver: a real GPU may fuse multiply-adds or round square roots and divisions differently, and a driver can refuse a shader the checker accepts.
  • Single-precision floor: on the sphere the 64-bit residual falls to 1e-12 in 300 iterations while the 32-bit one stalls at 5e-6, so a steady GPU run cannot meet a residual target below about 1e-6. Compressible record, GPU backend
  • Not on the device yet: adaptive refinement, the viscous terms, moving bodies.

The gyroid and Schwarz surface term behind lattice fill, sampled on the extraction grid

Lattice implicit field

Opt-in, off by default

Lattice fill is a CPU operation. When asked, the periodic-surface term and its density grading are evaluated on the device at every sampled grid node, and everything that decides the solid stays in 64-bit on the CPU.

On the GPU

  • The gyroid, Schwarz P and Schwarz D field term, one shader invocation a node, in batches of whole tiles
  • Uniform and linear density grading

On the CPU

  • The body clip and the skin
  • Sub-block centres, the surface solves, refinement and every volume integral
  • Density fields resolved from an expression, a distance or a stress result: evaluated on the CPU and uploaded per node

How closely the device matches

  • The opening batch of every fill is checked against the 64-bit CPU field at 64 points to 1e-5. A miss abandons the GPU for that fill, and the report says why. lattice field source notes
  • The shader carries its own sine and cosine, because the built-in ones are not precise enough for this, and never sees a large argument: each tile's phase is reduced on the CPU beforehand.

Limits

  • No speed-up is recorded for this path.
  • Off unless asked for, in which case the fill is byte for byte the CPU fill.

Built, and not the default

Two kernels were built, proved correct, and then left off, because the measurement did not justify switching them on.

Measurement renders

Correct on the device; not faster

  • The orthographic depth, coverage and shaded renders that shape comparison scores, and the silhouette overlap count, on a GPU render pipeline.
  • Live on an NVIDIA card at 8 views and 512 px: 23/23 checks pass, the worst mask difference is 0.0004 % of pixels with every one on the silhouette boundary, and the lowest structural similarity is 0.9998 against a limit of 0.98. GPU record §5
  • On that evidence it is not faster than the software path: 0.18x to 0.41x in one run and 0.39x to 2.23x in another, on a machine shared with other jobs. The software renderer stays the default. GPU record §5

Voxelising the body

A CPU fix removed the target

  • A ray-casting voxeliser with a safety net: any ray whose result could depend on single-precision rounding is flagged and recomputed on the CPU, so the mask is exact whenever the device finishes.
  • Before switching it on, the CPU loop was given a spatial index. That alone made voxelising 66x to 85x faster on a turbine blade and a gripper finger and 52x on a test part, with identical masks, and left the stage at 1.2 % of a solve or less. GPU record §3
  • With so little left to win, the GPU voxeliser has no target here and nothing in it is on by default.

Measured, and not built

A kernel is built only if its stage is at least a quarter of the wall time on a real workload, or an optimistic shader would make the whole job half as fast again. These did not pass, or have not been built yet.

Closest-point queries for mesh comparison

Not built

  • On real scan-comparison cases, closest-point work is at best 11 % of a comparison, and an infinitely fast kernel would make the comparison at most 1.12 times faster. The search is already tree-accelerated on the CPU. GPU record §2

Stress analysis and topology optimisation

Profiled on the CPU; a kernel is recommended; not built

  • The profile recommends one resident matrix-free conjugate-gradient kernel for both in-process solvers. Its expected whole-run gain is 3.0–3.6x for topology optimisation and 3.3–4.1x for the voxel stress solver, if the kernel itself is 10 times faster than the CPU. GPU record §7
  • That factor is a planning figure, not a demonstrated one: no GPU was used in this profile. Single-precision convergence of the optimiser has not been checked against the 64-bit solver either.
  • The external finite-element solver is out of reach of a shader port, and so is the tetrahedral mesher that feeds it.

A higher-precision pressure residual

Measured to change nothing; not built

  • See the wind tunnel limits above: the drag and the velocity residual are the same with the solve at the single-precision floor and at a true tolerance.

Turning it on

More demos

All demos →

Build your own part with NativeCAD

Try it free with the keyless evaluation · $200 per seat per year · Kernel SDK for products.