← 返回事件
持续讨论AI发版

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

图:PyTorch Releases

发生了什么

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…

摘要按规则整理自下方来源原文

为什么在扩散

来源