From 4b179a9b02cd8ce88ab38ce72bec11f73b8025a0 Mon Sep 17 00:00:00 2001 From: NAUD Maxence <maxence.naud@cea.fr> Date: Thu, 15 Feb 2024 14:05:58 +0000 Subject: [PATCH] [Add] 'Producer_Op' tensor constructor now copies the backend of its output Tensor --- include/aidge/operator/Producer.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/aidge/operator/Producer.hpp b/include/aidge/operator/Producer.hpp index fe9b044e2..8dde6e032 100644 --- a/include/aidge/operator/Producer.hpp +++ b/include/aidge/operator/Producer.hpp @@ -51,6 +51,8 @@ public: : OperatorTensor(Type, 0, 0, 1), Attributes_(attr<ProdAttr::Constant>(constant)) { + if (tensor->getImpl()) + mImpl = Registrar<Producer_Op>::create(tensor->getImpl()->backend())(*this); mOutputs[0] = tensor; // copy the pointer of the Tensor } -- GitLab