Skip to content

[core] resetInput() not working on MetaOperator

As reported in this issue: [aidge_quantization#62 (comment 3394113)], the resetInput() method does not work on nodes that are meta-operators. Indeed, to remove the input tensors of these nodes, it is necessary to go through the first node of the meta-operator. This problem is demonstrated by the following code:

std::shared_ptr<Aidge::OperatorTensor> opTensor =std::static_pointer_cast<OperatorTensor>(node->getOperator());
       opTensor->resetInput(0);
       Aidge::DataType dt = opTensor->getInput(0)->dataType();
       Log::debug("Input datatype is: {}",dt);

this will still display the datatype of the node (instead of getting a nullptr)