Performance¶
Batched reads (
get_batch(), theDistDatasetdefault): 10–27× cheaper per row for small rows; 1.2–3.9× faster VAE epochs.Loader workers: one or two
ThreadDataLoaderworkers usually hide batched reads; forkedDataLoaderworkers needpersistent_workers=True.Reuse destination buffers with
register_recv(); fresh buffers are registered on every read (get_profile(name)["mr_miss"]).method=1is fastest; batchedmethod=0comes close for small rows.Profiling:
DDSTORE_PROFILE=1+get_profile(name)splits read time into lock wait, registration,fi_readpost and completion, and GPU sync (vae-ddp.pyprints a summary). bench_get.py measures per-row cost vs row size, destination, batch size and threads.
Measurements: results.