M2 / M3 measurements without a GPU¶
Date: 2026-09-25. Same machine as the
M0/M1 measurements: a cloud container with 4 vCPU
(Intel Xeon @ 2.10 GHz), 15 GB RAM and no GPU. numba 0.67, zarr 3.1.6,
zarr-vectors 0.9.3.dev45 (the pinned gpu-backend commit 06a3bc8).
Everything that needs a GPU is still to measure: fused-kernel pt/s and FLOP/s, Nsight metrics, the H100 Q2 figure, and I/O wait with a fast compute loop. This page records what can be checked without one.
M2: the CUDA kernels, checked without a GPU¶
Check |
Result |
|---|---|
NVRTC 12.9 compiles every specialisation of |
177 kernels (3/6/12-DOF × 5 objectives × 3 interpolations × u8/u16/f32, plus solve and sample kernels), no errors |
|
displacement difference ≤ 3.3e-7 voxel, identical status and iteration counts (3/6/12-DOF, SSD/ZNSSD/ZSSD/NSSD/SAD, tricubic/trilinear/nearest, u8/u16/f32 bricks) |
numba CPU engine vs numpy reference, all 30 objective × DOF × interpolation combinations, 40 points |
≤ 1e-6 voxel, 100 % status agreement |
float32 array path (the cupy path’s arithmetic, on numpy) at coordinates > 1000 |
≤ 1e-3 voxel, 100 % status agreement |
ptxas -v for sm_90 (no spills anywhere). This is a static view of register pressure, not a timing:
kernel (ZNSSD, tricubic, u16) |
registers |
stack |
shared |
resident warps / SM (256-thread blocks) |
|---|---|---|---|---|
|
128 |
0 |
0.9 KB |
16 |
|
128 |
32 B |
1.8 KB |
16 |
|
250 |
520 B |
4.8 KB |
8 |
|
75 / 168 |
0 / 1.2 KB |
— |
— |
|
40 |
32 B |
— |
— |
12-DOF register pressure, a listed risk, is real: 250 registers halve occupancy relative to 6-DOF. Whether latency hiding suffers is for Nsight on the first GPU run.
M2: restructured-CPU baseline (Q5)¶
The fused step in numba across all four cores (backend cpu), timed by
python -m zvdvc.bench.throughput on an in-memory speckle brick (I/O
excluded), starting 0.6 voxel off a pure translation (3 iterations):
M (samples) |
sphere |
DOF |
pt/s (4 cores) |
≈ GFLOP/s (model count) |
|---|---|---|---|---|
2 000 |
32 |
6 |
1 019 |
4.5 |
2 000 |
32 |
12 |
831 |
5.3 |
4 096 |
48 |
6 |
443 |
4.0 |
4 096 |
48 |
12 |
391 |
5.1 |
numpy reference, 2 000 |
32 |
6 |
93 |
0.4 |
On case S (whole-volume in memory, wavefront seeding, same accuracy as M1):
pt/s on 4 cores |
vs CCPi, 4 processes on the same 4 cores |
|
|---|---|---|
numba engine, 12-DOF |
839 |
6.8× (CCPi 123) |
numba engine, 6-DOF |
1 154 |
7.4× (CCPi 155) |
CCPi, 1 process, 12-DOF |
37.5 |
— |
Against the model. PERFORMANCE.md §5 assumes a restructured CPU node reaches 12–35 k pt/s at scenario B settings on 32 cores, i.e. 375–1 100 pt/s per core. This implementation measures about 110 pt/s per core (443 on 4). That is roughly 1 GFLOP/s per core: scalar numba, no explicit SIMD. Either the model is optimistic for a CPU port of this effort, or a hand-vectorised CPU kernel would close the gap. Until one exists, the GPU-vs-restructured-CPU ratio should be taken as larger than §5’s 1.5–12× for I/O-bound runs.
M3: case M through the tiled pipeline (CPU engine)¶
Case M: zvdvc synth --shape 1024 1024 1024 --field sinusoid --spacing 16 --subvol-size 48 --subvol-npts 4096 --dof 6. That is u16, a sinusoid of
amplitude 1 voxel and wavelength 1 024 along x, 226 981 points (spacing 16,
faces excluded), two 2 GB volumes (speckle does not compress), made in 9 min on
4 processes. It was run with 8 tiles of 512³ (point cells 256³),
prefetch_depth 2, rigid seeds, backend cpu.
Stage |
Time |
|---|---|
plan (points store read, 8 tiles, memory check, results store allocated) |
0.6 s |
run (read + solve + write, 8 tiles) |
516 s → 440 pt/s |
finalize (presence rebuild, metadata, |
0.2 s |
M3 criterion |
Measured |
|---|---|
Accuracy (not an M3 criterion, but checked) |
100 % GOOD; RMSE (x, y, z) 0.0025 / 0.0012 / 0.0012 voxel; p99 0.0073 |
Tiled run reproduces the in-memory result bit for bit |
yes: 1 500 random points re-solved from whole-volume bricks give identical float32 parameters and statuses (the unit test does the same on every point of a smaller case) |
Bytes read within 5 % of the α model |
5.04 GB read = exactly the per-tile brick boxes ( |
Compute waits on I/O ≤ 20 % (Q4) |
0.03 s of 511 s (< 0.01 %). Met trivially: CPU compute is slow. It is not a meaningful Q4 answer until the GPU run |
Results store passes zarr-vectors validation |
0 errors, 0 warnings (level 3: structure, metadata, consistency) |
Reads back through |
3 375 points in the (0–256)³ box = expected count |
Resume is tested separately (tests/test_pipeline.py). Three tiles are
written, then run is called again: it skips those three, solves the other
five, and the final store is identical to an uninterrupted run.
What is still unmeasured¶
Fused-kernel pt/s and achieved FLOP/s on any GPU (the M2 “done when” line for Q2); the kernels have never executed on a device.
The device read paths (
to_devicepinned staging,read_cells(device="cuda")).Case M on one GPU: bit-for-bit against the in-memory GPU run, and the Q4 I/O wait with a compute loop fast enough to expose it.
The GPU tests are ready (pytest -m gpu, including a pipeline test on the
fused backend), and the first GPU session should run them before anything else.