atiyo:

Are there any existing solutions to this? If not, I think what I would like is an option I could enable which would force me to specify the device on which all leaf tensors live. Does such an option exist? Am I the only person who would be interested in this?


The canonical thing is to test in an environment that resembles the target better.
There are 19 other people 3 who want this. However, there are reservations to the feature request because it would replace an obvious way to get things wrong with a more subtle one.
Best regards
Thomas