Solved by ptrblck in post #9 
              
              
                Ah OK. 
The backward pass of repeat_interleave is not deterministic as explained in the linked docs: 

Additionally, the backward path for  repeat_interleave()  operates nondeterministically on the CUDA backend because  repeat_interleave()  is implemented using  index_select() , the backward path fo…