It has happened to me earlier too. I tested the code on an older version of Torch and I got an error instead. Mine problem was related to passing torch Tensor to a function written to take normal Python numeric values.
I have since cast the tensors to int before passing to the function and so far it hasn’t been failing without warning.
When it happened, it happened whether GPU or CPU was used. It was happening on the the latest stable version of pyTorch 1.0 CUDA 10.0 on both Linux Docker and Windows.