Topic rng

Fix monkey patching of torch rng functions when generator is explicitly used.