CostGraphDef has been modified to keep track of the accuracy of the cost estimation.
PiperOrigin-RevId: 200078367
This commit is contained in:
parent
6aeab4f540
commit
20a8e604e3
@ -69,6 +69,9 @@ message CostGraphDef {
|
||||
|
||||
// Ids of the control inputs for this node.
|
||||
repeated int32 control_input = 8;
|
||||
|
||||
// Are the costs inaccurate?
|
||||
bool inaccurate = 17;
|
||||
}
|
||||
repeated Node node = 1;
|
||||
}
|
||||
|
@ -98,6 +98,7 @@ Status AnalyticalCostEstimator::PredictCosts(const GraphDef& optimized_graph,
|
||||
node_costs.compute_time.asMicroSeconds().count());
|
||||
cost_node->set_memory_time(
|
||||
node_costs.memory_time.asMicroSeconds().count());
|
||||
cost_node->set_inaccurate(node_costs.inaccurate);
|
||||
for (const auto& output : op_context.op_info.outputs()) {
|
||||
auto output_info = cost_node->add_output_info();
|
||||
output_info->set_dtype(output.dtype());
|
||||
|
Loading…
x
Reference in New Issue
Block a user