import gc
import torch
a = torch.empty(102410241024)
b = torch.ones(102410241024, device=‘cuda’)
a.copy_(b, non_blocking=True)
del a # Python will release the memory of a. Could this cause an exception in copy_ here?
gc.collect()
import gc
import torch
a = torch.empty(102410241024)
b = torch.ones(102410241024, device=‘cuda’)
a.copy_(b, non_blocking=True)
del a # Python will release the memory of a. Could this cause an exception in copy_ here?
gc.collect()