mirror of https://github.com/llvm/torch-mlir
Fix RuntimeError while running examples/eager_mode.py (#1647)
parent
9fb63ce9d9
commit
853fd5c965
|
@ -88,4 +88,4 @@ class EagerModeRefBackend(TorchMLIREagerBackend):
|
||||||
return torch.from_numpy(e).clone()
|
return torch.from_numpy(e).clone()
|
||||||
|
|
||||||
def transfer_from_torch_to_device(self, tensor: torch.Tensor) -> np.ndarray:
|
def transfer_from_torch_to_device(self, tensor: torch.Tensor) -> np.ndarray:
|
||||||
return tensor.numpy()
|
return tensor.detach().numpy()
|
||||||
|
|
Loading…
Reference in New Issue