MergeNode ensure that channel must have 2 users
All checks were successful
Validate Operations / validate-operations (push) Successful in 16m7s
All checks were successful
Validate Operations / validate-operations (push) Successful in 16m7s
This commit is contained in:
@@ -61,11 +61,9 @@ public:
|
|||||||
|
|
||||||
ChannelOrLocalOp getAsChannelValueAndInsertSender(SpatWeightedCompute spatWeightedCompute) {
|
ChannelOrLocalOp getAsChannelValueAndInsertSender(SpatWeightedCompute spatWeightedCompute) {
|
||||||
|
|
||||||
if (channelSendInserter == nullptr) {
|
auto [first, second] = channelNewInserter();
|
||||||
auto [first, second] = channelNewInserter();
|
channelNewOpVal = first;
|
||||||
channelNewOpVal = first;
|
channelSendInserter = second;
|
||||||
channelSendInserter = second;
|
|
||||||
}
|
|
||||||
auto BB = computeResults.innerValue.getParentBlock();
|
auto BB = computeResults.innerValue.getParentBlock();
|
||||||
if (!BB->empty() && isa<spatial::SpatYieldOp>(BB->back()))
|
if (!BB->empty() && isa<spatial::SpatYieldOp>(BB->back()))
|
||||||
insertPointSend = InsertPoint(BB, --BB->end());
|
insertPointSend = InsertPoint(BB, --BB->end());
|
||||||
@@ -292,7 +290,8 @@ private:
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
auto newInst = rewriter.clone(op, mapper);
|
auto newInst = rewriter.clone(op, mapper);
|
||||||
//TODO Refactor in a lambda? same code just different cast, but templated lambda are C++20 and a free function is a bit too much
|
// TODO Refactor in a lambda? same code just different cast, but templated lambda are C++20 and a free function
|
||||||
|
// is a bit too much
|
||||||
if (auto vmOp = llvm::dyn_cast<spatial::SpatWeightedMVMOp>(newInst)) {
|
if (auto vmOp = llvm::dyn_cast<spatial::SpatWeightedMVMOp>(newInst)) {
|
||||||
auto oldIndex = vmOp.getWeightIndex();
|
auto oldIndex = vmOp.getWeightIndex();
|
||||||
auto newWeight = mapper.lookup(*std::next(fromCompute.getWeights().begin(), oldIndex));
|
auto newWeight = mapper.lookup(*std::next(fromCompute.getWeights().begin(), oldIndex));
|
||||||
|
|||||||
Reference in New Issue
Block a user