Hi @ptrblck I bypassed the problem with a bandage-aide solution: send the tensor to CPU, run the function, send the result back to GPU.
It’s an annoying issue with no obvious solution on the internet. I can work on code that reproduces the issue if that is useful.