ProvenanceTensor
bug when used with torch.set_default_device
#3218
Labels
ProvenanceTensor
bug when used with torch.set_default_device
#3218
When trying to debug the code from the forum post I came across this bug:
returns
tensor([], device='cuda:0')
Two observations:
torch.set_default_device
is not used:print(torch.as_tensor(y.cuda()))
works finetorch.set_default_device
is used then the following code gets invokedhttps://github.com/pytorch/pytorch/blob/main/torch/utils/_device.py#L72-L76
where
func(*args, **kwargs)
returnstensor([], device='cuda:0')
. This doesn't happen when.cuda()
is used like in 1).The text was updated successfully, but these errors were encountered: