[KongchangAI]
Other

DataLoader

Timeline (last 90 days)

Nov 5

When DataLoader's shuffle=True, a custom torch.Generator should be passed explicitly with a seed set, so as to control the source of randomness in data order.

Unverified50%
Nov 5

When DataLoader's num_workers > 0, each worker has its own independent random state, and a seed should be derived from the base seed and set for each worker via worker_init_fn.

Unverified50%
Oct 23

For a small corpus of 1000 words, setting num_workers=0 when using DataLoader is more efficient than multiprocessing.

Unverified50%
Oct 14

On an H100, the GPU completes one computation step far faster than data loading, and a low num_workers causes the dataloader to be unable to feed data in time, forcing the GPU to idle and wait, i.e. the data starvation problem.

Unverified50%
Oct 14

In the PyTorch DataLoader, num_workers determines how many independent subprocesses are used to read and preprocess data in parallel, and a low value prevents data preparation from overlapping with GPU computation.

Unverified50%
Oct 12

TorchCodec supports placing decoding work on the GPU and using it together with DataLoader's multi-process workers to alleviate the CPU bottleneck common in video decoding.

Unverified50%

All Facts (7)

Source Articles