Case A (iDVC example), real data, on a GPU workstation: zvDVC vs CCPi¶
Date: 2026-09-26. Workstation msm12: 32 cores (x86-64), 251 GB RAM, NVIDIA
RTX A2000 12 GB (driver 580, CUDA 12.9 via conda: cupy 14.2, NVRTC 12.9).
zvDVC at commit 57049a6 (branch stage1-trust). CCPi dvc 22.0.0.
This is the first measurement on the real iDVC example data and the first on a GPU. It replaces the synthetic twin of 2026-09-25-M4-case-A-twin.md.
Setup¶
volumes |
Zenodo 7363345: |
points |
CCPi |
settings |
CCPi |
CCPi runs |
iDVC: one |
zvDVC runs |
parity: whole volumes in memory, CCPi’s point order (wavefront). CLI: |
Reproduce:
eval "$(scripts/get_ccpi_dvc.sh)" # CCPi 22.0.0 into ~/.local/opt
python -m zvdvc.bench.case_a run --data runs/case_A_data --out runs/case_A --backends fused cpu --ccpi-processes 32
Speed¶
run |
wall time |
points/s |
vs iDVC |
|---|---|---|---|
CCPi, iDVC (1 process, 32 threads) |
2 231 s (37 min) |
2.1 |
1× |
CCPi, 32 processes × 1 thread |
711 s |
6.6 |
3.1× |
zvDVC fused (GPU), parity |
1.6 s |
2 928 |
1 396× |
zvDVC fused (GPU), CLI end to end |
4.3 s |
1 098 |
524× |
zvDVC cpu (32 cores), parity |
7.6 s |
615 |
293× |
zvDVC cpu (32 cores), CLI end to end |
17.1 s |
274 |
131× |
CCPi gains almost nothing from threads: 32 threads give 2.1 points/s, and 32 single-thread processes give 6.6 points/s in total. The CLI rows include interpreter start-up, imports and writing the results store; with only 4 680 points these fixed costs dominate.
How the GPU number got here (this session)¶
The first GPU run of the same case took 67.7 s. Four changes brought it to 1.6 s, each verified on these points (statuses and iteration counts unchanged; bit-identical where no arithmetic changed):
change |
|
central grid (fused) |
|---|---|---|
first GPU run |
38 |
67.7 s |
upload each volume once, not once per wavefront shell |
38 |
2.5 s |
sphere template samples in z, y, x order |
6.4 |
1.7 s |
u8 stencil rows as two aligned 32-bit loads |
3.7 |
1.6 s |
The sample order mattered most. Random order sent each warp’s 32 threads to voxels all over the 80-voxel subvolume, so nearly every load missed cache. On a 285 480-point 3D grid through the sample the fused solve went from 90.4 s to 18.7 s; the 32-core CPU engine takes ~300 s there.
Agreement¶
Errors are taken over points GOOD in both codes. Interior points are those whose subvolume (template extent + 2-voxel stencil) stays inside the volume at CCPi’s displacement; edge points are the rest (see below).
zvDVC (fused) vs |
points |
median |Δu| |
p95 |Δu| |
status agreement |
GOOD in both |
mean Δu (x, y, z) |
|---|---|---|---|---|---|---|
CCPi iDVC, interior |
4 628 |
0.0512 |
0.152 |
100.0 % |
4 628 |
−0.0027, −0.0017, −0.0005 |
CCPi iDVC, edge |
52 |
— |
— |
0 % |
0 |
— |
CCPi’s 5-point reference |
5 |
0.0428 |
0.0458 |
100 % |
5 |
The cpu backend gives the same figures to the digits shown, and the CLI the same as parity.
Against the MVP criterion (Q1: median ≤ 0.05, p95 ≤ 0.2, status ≥ 98 %): status and p95 pass; the median misses by 0.0012 voxel. We report this as a marginal fail rather than moving the threshold, with what the data says about its cause:
There is no systematic difference. The mean difference is at most 0.003 voxel on any axis.
The spread is the same as zvDVC’s with itself. The two codes sample each subvolume at different random points. Run twice with only the template seed changed, zvDVC disagrees with itself by median 0.051 and p95 0.15, the same as with CCPi (0.0512 and 0.152). On this scan the choice of 8 000 sample points alone moves a result by ~0.03 voxel per axis, falling as 1/√n with more samples (error-floor study, section 3).
So the criterion cannot be met by zvDVC against itself at CCPi’s settings: it
sits below the difference between two correct solvers. A criterion that can
fail for the right reasons is a mean difference ≤ 0.01 voxel per axis and a
spread no larger than zvDVC’s own seed-to-seed spread. zvDVC passes both
against CCPi. This is now the revised Q1 (docs/MVP_PLAN.md), computed by
bench.compare_ccpi next to the original: mean Δu (−0.0027, −0.0017, −0.0005),
spread ratio (1.03, 0.98, 1.02) against zvDVC’s seed 0 vs seed 1, on 4 628 interior points: pass.
Edge points: CCPi reads outside the image¶
zvDVC marks 52 points RANGE_FAIL: their deformed subvolumes, at the measured ~33-voxel x displacement, reach past x = 1519. CCPi reports all 52 as GOOD. Reading CCPi’s source (possible since zvDVC became GPL-3.0) explains why:
Search::search_pt_setupcentres a fixed box (subvolume diameter + 2 ×disp_max+ 4) on the point andInterpolate::kernelsreads it from the file row by row, without clipping it to the image. Past x = 1519 a row read continues into the start of the next row; past the last slice the read fails and the buffer keeps uninitialised memory.Interpolate::tri_cub_Lekchecks samples only against that loaded box (act_box->contains), never against the image, soRange_Failis never raised for leaving the volume.
CCPi’s results at these points are computed from wrapped or undefined data.
zvDVC does not reproduce this (no “parity” mode): it would copy a defect. The
comparison tools now report such points separately
(bench/metrics.edge_mask).
CCPi disagrees with itself when the grid is split¶
The 32-process CCPi run is valid as a timing but not as a reference. Against CCPi’s own single-process run, 1 029 of 4 680 points (22 %) differ by more than 1 voxel (p95 17 voxels), and CCPi reports every one of them GOOD. Each process starts its own wavefront on a subset of the grid, so points lose the neighbours that would seed them and converge to wrong solutions, which CCPi does not detect. zvDVC’s agreement with that run (p95 16 voxels) reflects this, not zvDVC. It is also a warning for anyone splitting CCPi runs to use more cores: the results need their seeding checked.
What this does not cover¶
Tiled multi-GPU runs, and anything larger than one workstation GPU (M4 on 8 × H100 is still to be measured).
Strain: zvDVC does not compute it yet (M5).
Only one dataset. The error-floor study uses the same scan.