thread blocked when moving a tensor from GPU to CPU, by ...
github.com › pytorch › pytorchNov 05, 2020 · The thread blocked or the process was hanging when moving a tensor's memory access from GPU to CPU, by calling the function .cpu () or to ('cpu') in pytorch. This kind of block can be stop by any window event like mouse moving/clicking or keyboard pressing, and even a pop-up system notification. To Reproduce Steps to reproduce the behavior:
torch.Tensor.cpu — PyTorch 1.11.0 documentation
pytorch.org › generated › torchtorch.Tensor.cpu. Returns a copy of this object in CPU memory. If this object is already in CPU memory and on the correct device, then no copy is performed and the original object is returned. memory_format ( torch.memory_format, optional) – the desired memory format of returned Tensor. Default: torch.preserve_format.