cdrouin:

It’s a hack, but making a call to torch.cuda.current_device() (as mentioned in that thread) appears to resolve this issue.


Without this line of code you cannot call any CUDA functions without raising an error?
CC @peterjc123: could this be related to the linked issue (which should have been resolved)?