trunk/9beae8fa8cb87e424fefc7a43ddf96418286e0d4: [CUDA RNG] Preallocate graph-owned RNG state before capture (#193993)
- PyTorch: 2339 events in the last 90 days
- PyTorch: 2309th Release in the last 90 days
- Previous: earlier the same day · trunk/344044909e92e95d5c933eebfb8fe83951a1a22c
What happened
Lazy CUDA RNG initialization allocates seed and offset tensors on the default stream while capture is active. During thread-local capture, the allocation can query an event recorded on the capturing stream and fail with cudaErrorCapturedEvent . Have CUDAGraph own and reserve RNG buffers before capture, while assigning them to generator states only on first use. Expose num_rng_states with a default of 8, reject capac…
Summary assembled by rule from the sources below