diff --git a/python/torch_mlir_e2e_test/eager_backends/refbackend.py b/python/torch_mlir_e2e_test/eager_backends/refbackend.py index 85f4b8c03..3449ab655 100644 --- a/python/torch_mlir_e2e_test/eager_backends/refbackend.py +++ b/python/torch_mlir_e2e_test/eager_backends/refbackend.py @@ -88,4 +88,4 @@ class EagerModeRefBackend(TorchMLIREagerBackend): return torch.from_numpy(e).clone() def transfer_from_torch_to_device(self, tensor: torch.Tensor) -> np.ndarray: - return tensor.numpy() + return tensor.detach().numpy()