CUDA error after cudaEventDestroy in future dtor: an illegal memory access was encountered
line 1483, in binary_cross_entropy
return torch._C._nn.binary_cross_entropy(input, target, weight, size_average, reduce)
RuntimeError: cudaEventSynchronize in future::wait: an illegal memory access was encountered
I encountered this error while training my model. I am using pytorch version 0.4.0, cuda version 9.0 and cudnn version 9.70. The only way currently for me to overcome this problem is to set
torch.backends.cudnn.enabled=False

If I disable cudnn, I observe the training takes more time than usual. Is there are fix to this issue?