mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
in caching allocator, ignore and clear the error if not ready
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/18584 Differential Revision: D14675041 Pulled By: bddppq fbshipit-source-id: c1fab797e0d224e0a481a0395a3f9975c4265ff6
This commit is contained in:
committed by
Facebook Github Bot
parent
600eeecbf4
commit
2f174e9453
@ -554,6 +554,8 @@ struct THCCachingAllocator
|
||||
|
||||
cudaError_t err = cudaEventQuery(event);
|
||||
if (err == cudaErrorNotReady) {
|
||||
// ignore and clear the error if not ready
|
||||
cudaGetLastError();
|
||||
break;
|
||||
} else if (err != cudaSuccess) {
|
||||
C10_CUDA_CHECK(err);
|
||||
|
Reference in New Issue
Block a user