Hi,
According to this:
RuntimeError: Event device type CUDA does not match blocking stream's device type CPU.
It might not relate to the compatibility between PyTorch and TorchVision.
Could you share how do you apply the training?
Please try to add the below line into your script to see if it helps.
import pycuda.autoinit
Thanks.