Performance: Diracs on a Grid
The two paths of Diracs on a Grid: the dedicated solver, and the same diracs given as a cloud ( a SumOfDiracs ), which is what a solve on positions does.
One problem, at every size: N x N diracs of equal masses on the unit square, against an image of 512 x 512 affine pixels ( Image( degree = 1 ) ), a field of sines with an offset, 1 + 0.5 sin( 6 pi x ) sin( 4 pi y ). Whole solves from a cold start, stopped on max |mass - target| / target <= 1e-6; the CPU on all its cores ( 2 x 64 AMD EPYC 7763 ), the cards an RTX 2080 Ti and an H100.
Total time for a solve against an image of 512 x 512 affine pixels: a slope of one decade per decade is linear. Log-log; hover a point for its time.
| dedicated | generic | |||
|---|---|---|---|---|
| all the cores | RTX 2080 Ti / H100 | all the cores | RTX 2080 Ti / H100 | |
| 64 x 64 | 0.0493 s ( 4 ) | 0.0395 s ( 4 ) / 0.0266 s ( 4 ) | 0.155 s ( 5 ) | 0.0909 s ( 4 ) / 0.0796 s ( 4 ) |
| 128 x 128 | 0.0792 s ( 5 ) | 0.0412 s ( 5 ) / 0.0275 s ( 5 ) | 0.171 s ( 5 ) | 0.113 s ( 4 ) / 0.0846 s ( 4 ) |
| 256 x 256 | 0.194 s ( 7 ) | 0.0494 s ( 7 ) / 0.0280 s ( 7 ) | 0.303 s ( 5 ) | 0.147 s ( 4 ) / 0.102 s ( 4 ) |
| 512 x 512 | 0.261 s ( 7 ) | 0.0639 s ( 7 ) / 0.0312 s ( 7 ) | 0.846 s ( 5 ) | 0.321 s ( 4 ) / 0.196 s ( 4 ) |
| 1024 x 1024 | 0.431 s ( 7 ) | 0.118 s ( 7 ) / 0.0414 s ( 7 ) | 2.34 s ( 5 ) | 0.989 s ( 4 ) / 0.510 s ( 4 ) |
| 2048 x 2048 | 0.962 s ( 8 ) | 0.348 s ( 8 ) / 0.0715 s ( 8 ) | 9.62 s ( 5 ) | 4.04 s ( 4 ) / 2.14 s ( 4 ) |
| 4096 x 4096 | 3.24 s ( 8 ) | – / – | 54.4 s ( 5 ) | – / – |
Seconds, a whole solve from a cold start to `max |mass - target| / target <= 1e-6`: N x N diracs of equal masses against an image of 512 x 512 affine pixels. dedicated: the grid's own Newton; generic: the same diracs as a cloud. In brackets: Newton iterations.
The gap grows with N. On the CPU: 3× at 512 x 512, 10× at 2048 x 2048, 17× at 4096 x 4096 ( 3.2 s against 54 s on the 128 cores ). On the 2080 Ti: 5× at 512 x 512, 12× at 2048 x 2048 ( 0.35 s against 4.0 s ); on the H100, 30× at 2048 x 2048 ( 0.072 s against 2.1 s ). Past a million diracs, a dirac costs the dedicated solver about 200 ns on the CPU, 83 ns on the 2080 Ti and 17 ns on the H100; the generic one more than 2 µs on the CPU, 0.5 to 1 µs on the cards. Below 256 x 256, fixed costs dominate ( 0.03 to 0.15 s ).
The dedicated solver computes in doubles, on the CPU and on the card. The generic one computes in doubles on the CPU, and on the card in floats first, then in doubles ( precision = "auto" ). Floats alone do not reach the tolerance: at 512 x 512 the generic solve stalls near 1e-3, the cells too small for the digits of a float.
The numbers on this page come from bench/bench_grid.py ( jobs grid and gpu_grid of bench/page.py ). The machines and the protocol of the other benchmarks are on the overview.