Now also googlenet runs

This commit is contained in:
ilgeco
2026-07-23 17:47:30 +02:00
parent c59e320efa
commit e7611be8e1
3 changed files with 7 additions and 9 deletions
@@ -262,13 +262,12 @@ static void collectClosure(Value value, Block &body, const DeferredInputPlan &pl
} // namespace
bool isDeferredFragmentAssemblyInput(
Value input, const ComputeInstance &consumerInstance) {
bool isDeferredFragmentAssemblyInput(Value input) {
auto blueprint = input.getDefiningOp<SpatBlueprintOp>();
if (!blueprint || blueprint.getMode() != "fragment_assembly")
return false;
return llvm::all_of(getBlueprintFragments(blueprint), [&](Value fragment) {
return getProducerValueRef(fragment, &consumerInstance).has_value();
return getProducerValueRef(fragment, nullptr).has_value();
});
}
@@ -279,7 +278,7 @@ LogicalResult prepareSingleCpuInput(OpBuilder &, Location loc, Value input, Bloc
Value graphLane, Value scheduledGraphLane,
DeferredInputPlan &plan) {
plan = {graphInput, {}, {}, {}, graphLane, scheduledGraphLane, {}, {}, {}, {}, 1, nullptr};
if (isDeferredFragmentAssemblyInput(input, consumerInstance)) {
if (isDeferredFragmentAssemblyInput(input)) {
plan.blueprint = input.getDefiningOp<SpatBlueprintOp>();
plan.originalSources = getBlueprintFragments(plan.blueprint);
return success();
@@ -310,7 +309,7 @@ LogicalResult prepareMultiCpuTupleInput(OpBuilder &, Location loc, Value input,
DeferredInputPlan &plan) {
const ComputeInstance &representative = tuple.instances.front();
plan = {graphInput, {}, {}, {}, graphLane, scheduledGraphLane, scheduledLane, {}, {}, {}, 1, nullptr};
if (isDeferredFragmentAssemblyInput(input, representative)) {
if (isDeferredFragmentAssemblyInput(input)) {
plan.blueprint = input.getDefiningOp<SpatBlueprintOp>();
plan.originalSources = getBlueprintFragments(plan.blueprint);
return success();
@@ -22,8 +22,7 @@ struct DeferredInputPlan {
Block *scalarizedHoistBlock = nullptr;
};
bool isDeferredFragmentAssemblyInput(Value input,
const ComputeInstance &consumerInstance);
bool isDeferredFragmentAssemblyInput(Value input);
LogicalResult prepareSingleCpuInput(OpBuilder &builder, Location loc, Value input,
BlockArgument graphInput,
@@ -179,7 +179,7 @@ LogicalResult collectPeftClassOperandsAndResults(
for (Value weight : getComputeInstanceWeights(instance))
appendUnique(peftClassPlan.weights, weight);
for (Value input : getComputeInstanceInputs(instance))
if (!getProducerValueRef(input, &instance) && !isDeferredFragmentAssemblyInput(input, instance))
if (!getProducerValueRef(input, &instance) && !isDeferredFragmentAssemblyInput(input))
appendUnique(peftClassPlan.inputs, input);
}
return success();
@@ -222,7 +222,7 @@ LogicalResult collectPeftClassOperandsAndResults(
for (Value weight : getComputeInstanceWeights(instance))
appendUnique(peftClassPlan.weights, weight);
for (Value input : getComputeInstanceInputs(instance))
if (!getProducerValueRef(input, &instance) && !isDeferredFragmentAssemblyInput(input, instance))
if (!getProducerValueRef(input, &instance) && !isDeferredFragmentAssemblyInput(input))
appendUnique(peftClassPlan.inputs, input);
}
}