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 ed8cbc0 commit 6714f83Copy full SHA for 6714f83
runtime/core/exec_aten/util/tensor_util_portable.cpp
@@ -161,7 +161,7 @@ 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 || (t_dst.nbytes() == 0 && t_src.nbytes() == 0),
165
InvalidArgument,
166
"ExecutionPlan input supposed to preallocated but has nullptr for data");
167
// inputs with a size 0 dimension can be nullptr
0 commit comments