From 0ab9b3bc26aa5bc28d177eeaf13f84b717b5ea33 Mon Sep 17 00:00:00 2001 From: Lucy Qiu Date: Fri, 10 May 2024 17:02:12 -0700 Subject: [PATCH] Comment out memory planning log (#3581) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/3581 Differential Revision: D57187017 --- runtime/executor/method.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/runtime/executor/method.cpp b/runtime/executor/method.cpp index 1184eb0d3c8..3ac8e4897e4 100644 --- a/runtime/executor/method.cpp +++ b/runtime/executor/method.cpp @@ -933,10 +933,15 @@ Method::set_output_data_ptr(void* buffer, size_t size, size_t output_idx) { InvalidState, "Outputs can not be retrieved until method has been initialized."); - ET_CHECK_OR_RETURN_ERROR( - !pre_allocated_output_, - InvalidState, - "Overriding output data pointer allocated by memory plan is not allowed."); + // ET_CHECK_OR_RETURN_ERROR( + // !pre_allocated_output_, + // InvalidState, + // "Overriding output data pointer allocated by memory plan is not + // allowed."); + // TODO(T188740925): for now, return error without logs. + if (pre_allocated_output_) { + return ::torch::executor::Error::InvalidState; + } // Check the args ET_CHECK_OR_RETURN_ERROR(