From 0c200dfcccc243211b6b1e995b1e70639cd8cd21 Mon Sep 17 00:00:00 2001 From: panickal-xmos Date: Tue, 14 May 2024 11:04:09 +0100 Subject: [PATCH] Fix when ops have multiple operands --- xformer/Analysis/MemoryPlan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xformer/Analysis/MemoryPlan.cpp b/xformer/Analysis/MemoryPlan.cpp index df3b4ce21..c9ac18413 100644 --- a/xformer/Analysis/MemoryPlan.cpp +++ b/xformer/Analysis/MemoryPlan.cpp @@ -167,9 +167,9 @@ std::vector MemoryPlan::getAllocatedOffsets(const bool overlapOps, auto outVal = o->getResult(0); auto nextOp = *outVal.getUsers().begin(); // Identify chain of overlappable Ops - while (outVal.hasOneUse() && + while (outVal.hasOneUse() && !alreadyVisited.contains(nextOp) && nextOp->hasTrait()) { - inVal = nextOp->getOperand(0); + inVal = outVal; inputVals.push_back(inVal); alreadyVisited.insert(nextOp); outVal = nextOp->getResult(0);