← Back to events
ActiveAIRelease

trunk/9beae8fa8cb87e424fefc7a43ddf96418286e0d4: [CUDA RNG] Preallocate graph-owned RNG state before capture (#193993)

Photo: PyTorch Releases

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

Why it's spreading

Sources