We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3cf646 commit 62f8a8eCopy full SHA for 62f8a8e
runtime/core/exec_aten/util/tensor_util_portable.cpp
@@ -161,7 +161,8 @@ Error copy_tensor_data(
161
const torch::executor::Tensor& t_dst,
162
const torch::executor::Tensor& t_src) {
163
ET_CHECK_OR_RETURN_ERROR(
164
- t_dst.const_data_ptr() != nullptr,
+ t_dst.const_data_ptr() != nullptr ||
165
+ (t_dst.nbytes() == 0 && t_src.nbytes() == 0),
166
InvalidArgument,
167
"ExecutionPlan input supposed to preallocated but has nullptr for data");
168
// inputs with a size 0 dimension can be nullptr
0 commit comments