MaterializeMergeSchedule.cpp fix for yolo11_depth_18
This commit is contained in:
@@ -2350,20 +2350,29 @@ LogicalResult collectPackedRunsForWholeBatchInput(MaterializerState& state,
|
|||||||
if (run.sourceOp != key.instance.op || run.resultIndex != key.resultIndex)
|
if (run.sourceOp != key.instance.op || run.resultIndex != key.resultIndex)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SmallVector<WholeBatchAssemblyRange, 8> runRanges;
|
SmallVector<WholeBatchAssemblyRange, 16> runRanges;
|
||||||
runRanges.reserve(run.slots.size());
|
|
||||||
|
|
||||||
for (const PackedScalarRunSlot& slot : run.slots) {
|
for (const PackedScalarRunSlot& slot : run.slots) {
|
||||||
std::optional<ProducerKey> slotKey = getContiguousProducerKeyForKeys(slot.keys);
|
for (ProducerKey fragmentKey : slot.keys) {
|
||||||
if (!slotKey)
|
if (fragmentKey.instance.op != key.instance.op || fragmentKey.resultIndex != key.resultIndex)
|
||||||
return failure();
|
return failure();
|
||||||
|
|
||||||
if (wholeBatchRangeOverlaps(plan.coveredRanges, slotKey->instance.laneStart, slotKey->instance.laneCount))
|
if (fragmentKey.instance.laneCount == 0)
|
||||||
return failure();
|
return failure();
|
||||||
|
|
||||||
runRanges.push_back({slotKey->instance.laneStart, slotKey->instance.laneCount});
|
if (wholeBatchRangeOverlaps(plan.coveredRanges, fragmentKey.instance.laneStart, fragmentKey.instance.laneCount))
|
||||||
|
return failure();
|
||||||
|
|
||||||
|
if (wholeBatchRangeOverlaps(runRanges, fragmentKey.instance.laneStart, fragmentKey.instance.laneCount))
|
||||||
|
return failure();
|
||||||
|
|
||||||
|
runRanges.push_back({fragmentKey.instance.laneStart, fragmentKey.instance.laneCount});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (runRanges.empty())
|
||||||
|
continue;
|
||||||
|
|
||||||
plan.packedRuns.push_back(&run);
|
plan.packedRuns.push_back(&run);
|
||||||
|
|
||||||
for (WholeBatchAssemblyRange range : runRanges)
|
for (WholeBatchAssemblyRange range : runRanges)
|
||||||
|
|||||||
Reference in New Issue
Block a user