From a751e859099f62fe3bd31c291db23b297c7f4988 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Tue, 20 Feb 2024 17:37:11 +0100 Subject: [PATCH] Minor fix for dummy outputs --- src/operator/OperatorTensor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/operator/OperatorTensor.cpp b/src/operator/OperatorTensor.cpp index d3593cc61..7560daf0e 100644 --- a/src/operator/OperatorTensor.cpp +++ b/src/operator/OperatorTensor.cpp @@ -141,7 +141,9 @@ bool Aidge::OperatorTensor::outputDimsForwarded() const { forwarded &= mInputs[i] ? !(getInput(i)->empty()) : false; } for (IOIndex_t i = 0; i < nbOutputs(); ++i) { - forwarded &= !(getOutput(i)->empty()); + // If getOutput(i) is nullptr, ignore this output (it may be a dummy + // output in a MetaOperator) + forwarded &= (getOutput(i)) ? !(getOutput(i)->empty()) : true; } return forwarded; } -- GitLab