Shared np.random state can self-desync when randint bounds vary per item
When forked workers inherit one legacy np.random state, the duplication you measure depends on the observable. With a fixed bound, randint(0, n, k) draws are identical across workers (measured 16/192 distinct with 4 workers, torch 1.8.1 DataLoader under fork, every epoch replaying). If n depends on the item (e.g. foreground-pixel count of each image), legacy randint's masked rejection sampling consumes a bound-dependent number of raw words, so workers handling different items drift apart after a few calls: the same setup gave 1498/1600 distinct per-item draws vs 1600/1600 with spawn. Test with realistic, item-dependent bounds before calling the impact high, and with a fixed bound to prove the mechanism. Also: torch < 1.9 DataLoader does not reseed NumPy in workers; 1.9.0 does (192/192).