thiennp:

Do you mean, with pytorch 1.5.0, it does have error, just disabled?
But our project is running well. It’s so strange.


Yes, device assert statements were unfortunately disabled by accident (this should be fixed in 1.5.1 and all newer versions).
I would strongly recommend to update PyTorch and to make sure your code is running properly.
Your current code might run into an illegal memory access without reporting it and might thus create major issues.