Fix TensorBuilder to add subtensors to Plan::operands
Related issue is #3611
Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
std::shared_ptr<backend::operand::IObject>
TensorBuilder::wrapTensor(const graph::operand::Index &ind)
{
- return std::make_shared<operand::Object>(_tensors.at(ind));
+ if (_tensors.find(ind) != _tensors.end())
+ {
+ return std::make_shared<operand::Object>(_tensors.at(ind));
+ }
+ else
+ {
+ return std::make_shared<operand::Object>(_subtensors.at(ind));
+ }
}
void TensorBuilder::iterate(const IterateFunction &fn)
{
fn(it.first);
}
+ for (auto it : _subtensors)
+ {
+ fn(it.first);
+ }
}
std::shared_ptr<::arm_compute::ICLTensor>