std::cout << std::setw(15) << ms << " ms. " << std::setw(10)
<< results.percent_per_node_type[kind] << "%. " << kind << " ("
<< results.instances_per_node_type[kind] << " nodes";
- if (results.out_nodes.count(kind) == 0) {
- std::cout << ")" << std::endl;
- } else {
+ if (results.out_nodes.count(kind)) {
std::cout << ", out variant)" << std::endl;
+ } else if (results.native_nodes.count(kind)) {
+ std::cout << ", native)" << std::endl;
+ } else {
+ std::cout << ")" << std::endl;
}
}
std::cout << std::setw(15) << results.total_time << " ms. in Total"
if (nodes_[i].has_out_variant()) {
results.out_nodes.insert(kind);
results.out_nodes_count++;
+ } else if (nodes_[i].has_native()) {
+ results.native_nodes.insert(kind);
}
results.total_time += results.time_per_node[i];
}
std::unordered_map<std::string, float> percent_per_node_type;
std::unordered_map<std::string, int> instances_per_node_type;
std::unordered_set<std::string> out_nodes;
+ std::unordered_set<std::string> native_nodes;
};
IndividualMetrics benchmark_individual_ops(
return static_cast<bool>(fn_);
}
+ bool has_native() const {
+ return static_cast<bool>(native_fn_);
+ }
+
bool verify_outputs_not_overlapping_with_immutable_inputs() const;
private: