Repository navigation
Commit 8b1412f
committed
PatchMatch: Remove shared current-cost cache (refactor)
## Summary
- Read sampled current costs from the existing cost map in the ordered fold.
Remove the CUDA-only shared array, producer store and source-ID dispatch.
- Scope: one CUDA file, 1 insertion and 25 deletions (net 24 fewer source
lines). This removes a shared-array declaration of up to 512 bytes per
cooperative block without adding an option or persistent state. RNG and
addition order stay unchanged.
- The ordered fold now has one cost-read expression instead of a CUDA-only
cache/fallback split. Its value can be checked at the use site without
tracing an earlier producer write.
## Validation
- Incremental CUDA 13.2 build: four Ninja actions; the focused
mvs/patch_match_cuda_test passed (1/1).
- RTX 3080 Ti, 12 workers, default 15 samples, checkpoint HMM on and
rotation-buffer reuse off. Five-reference Fountain GEO N3 wall medians were
5.57/5.24 s at 1536 and 17.37/17.73 s at 3072. Ranges overlapped and
3072 controls drifted faster with run order; all paired maps were exact.
- Full 11-reference PHOTO/GEO N1 wall was 20.31/20.35 s at 1536 and
76.85/78.82 s at 3072, control/candidate. CPU user/system was
17.94/2.19 vs 18.03/2.02 s and 66.31/7.28 vs 66.09/7.26 s. Peak RSS
was 1202.2/1105.8 MiB and 2664.4/2610.8 MiB. All 44 depth/normal
maps matched at each size. The RSS gaps cannot be attributed to removal
of a 512-byte shared array; these runs do not establish a speed gain.
- clang-format-19 and git diff --check passed. Other GPUs, HIP and wider
source-count fallback remain untested.
AI disclosure: totally vibe coded.1 parent 3e5fa70 commit 8b1412f
1 file changed
Lines changed: 1 addition & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
1126 | | - | |
1127 | | - | |
1128 | | - | |
1129 | 1121 | | |
1130 | 1122 | | |
1131 | 1123 | | |
| |||
1375 | 1367 | | |
1376 | 1368 | | |
1377 | 1369 | | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | 1370 | | |
1386 | 1371 | | |
1387 | 1372 | | |
| |||
1633 | 1618 | | |
1634 | 1619 | | |
1635 | 1620 | | |
1636 | | - | |
1637 | | - | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
| 1621 | + | |
1646 | 1622 | | |
1647 | 1623 | | |
1648 | 1624 | | |
| |||
0 commit comments