Memory consumption in DAMAS
Running tests locally
with N = 441:
──────────────────────────────────────────────────────────────────────────────
Time Allocations
────────────────────── ───────────────────────
Tot / % measured: 19.7s / 70.3% 2.61GiB / 71.2%
Section ncalls time %tot avg alloc %tot avg
──────────────────────────────────────────────────────────────────────────────
compute csm 1 8.63s 62.3% 8.63s 945MiB 49.6% 945MiB
compute env 1 1.58s 11.4% 1.58s 220MiB 11.6% 220MiB
compute steeringvec 1 1.34s 9.68% 1.34s 278MiB 14.6% 278MiB
compute beamforming 1 964ms 6.95% 964ms 199MiB 10.5% 199MiB
compute psf 1 709ms 5.11% 709ms 118MiB 6.20% 118MiB
DAMAS single freq 1 434ms 3.13% 434ms 124MiB 6.49% 124MiB
compute psf_col 1 201ms 1.45% 201ms 20.2MiB 1.06% 20.2MiB
──────────────────────────────────────────────────────────────────────────────
and with N = 3721
──────────────────────────────────────────────────────────────────────────────
Time Allocations
────────────────────── ───────────────────────
Tot / % measured: 30.4s / 74.3% 7.68GiB / 86.6%
Section ncalls time %tot avg alloc %tot avg
──────────────────────────────────────────────────────────────────────────────
compute csm 1 8.77s 38.8% 8.77s 945MiB 13.9% 945MiB
DAMAS single freq 1 5.75s 25.4% 5.75s 4.29GiB 64.5% 4.29GiB
compute beamforming 1 3.49s 15.4% 3.49s 413MiB 6.06% 413MiB
compute steeringvec 1 2.10s 9.30% 2.10s 688MiB 10.1% 688MiB
compute env 1 1.57s 6.92% 1.57s 223MiB 3.28% 223MiB
compute psf 1 735ms 3.25% 735ms 122MiB 1.79% 122MiB
compute psf_col 1 200ms 0.88% 200ms 24.4MiB 0.36% 24.4MiB
──────────────────────────────────────────────────────────────────────────────
notice how allocations increase drastically for DAMAS (from 124MB -> 4290MB). That’s approx 36x increase in allcations for a 8x increase in size. Sounds like a type-instability.
Edited by ollyl