From 9141f35d0e47d06d7ccf6393d1a42d4cfbff44f9 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Wed, 5 Feb 2025 12:01:33 +0100 Subject: [PATCH] Fix bug #231 --- src/graph/GraphView.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/graph/GraphView.cpp b/src/graph/GraphView.cpp index e1a520865..fab9be915 100644 --- a/src/graph/GraphView.cpp +++ b/src/graph/GraphView.cpp @@ -266,7 +266,12 @@ void Aidge::GraphView::logOutputs(const std::string& dirName) const { AIDGE_THROW_OR_ABORT(std::runtime_error, "Could not create graph view log file: {}", inputPath); } - fmt::print(fp.get(), "{}\n", nodePtr->getOperator()->getRawOutput(outIdx)->toString().c_str()); + + auto oTensor = std::static_pointer_cast<OperatorTensor>(nodePtr->getOperator())->getOutput(outIdx); + std::shared_ptr<Tensor> fallback; + const Tensor& localTensor = oTensor->refFrom(fallback, "cpu"); + + fmt::print(fp.get(), "{}\n", localTensor.toString().c_str()); } } } -- GitLab