Add the execution mode column in the TF Stats tool's table.
PiperOrigin-RevId: 307449781 Change-Id: I315e45c1fbcb3257f1dbbe385774bf9ddd3cdb74
This commit is contained in:
		
							parent
							
								
									25e914cc44
								
							
						
					
					
						commit
						931269353d
					
				| @ -28,6 +28,7 @@ void CombineOpMetrics(const OpMetrics& src, OpMetrics* dst) { | ||||
|   DCHECK_EQ(src.name(), dst->name()); | ||||
|   dst->set_category(src.category()); | ||||
|   dst->set_provenance(src.provenance()); | ||||
|   dst->set_is_eager(dst->is_eager() || src.is_eager()); | ||||
|   dst->set_deduplicated_name(src.deduplicated_name()); | ||||
|   if (!dst->has_layout() && src.has_layout()) { | ||||
|     *dst->mutable_layout() = src.layout(); | ||||
|  | ||||
| @ -33,6 +33,7 @@ TfStatsRecord ConvertOpMetricsToTfStatsRecord( | ||||
|     double ridge_point_operational_intensity) { | ||||
|   TfStatsRecord record; | ||||
|   record.set_host_or_device(on_device ? "Device" : "Host"); | ||||
|   record.set_is_eager(metrics.is_eager()); | ||||
|   record.set_op_type(metrics.category()); | ||||
|   record.set_op_name(metrics.name()); | ||||
|   SetExecutionTimes(metrics, &record); | ||||
|  | ||||
| @ -69,4 +69,6 @@ message TfStatsRecord { | ||||
|   // Whether this operation is "Compute" or "Memory" bound, | ||||
|   // according to the Roofline Model. | ||||
|   string bound_by = 17; | ||||
|   // Whether this TF-op is eagerly executed. | ||||
|   bool is_eager = 18; | ||||
| } | ||||
|  | ||||
| @ -41,7 +41,7 @@ void HostOpMetricsDbBuilder::EnterOp(absl::string_view name, | ||||
|   OpMetrics* op_metrics = LookupOrInsertNewOpMetrics(/*hlo_module_id=*/0, name); | ||||
|   if (op_metrics->category().empty()) | ||||
|     op_metrics->set_category(category.data(), category.size()); | ||||
|   op_metrics->set_is_eager(is_eager); | ||||
|   op_metrics->set_is_eager(op_metrics->is_eager() || is_eager); | ||||
|   op_metrics->set_occurrences(op_metrics->occurrences() + 1); | ||||
|   op_metrics->set_time_ps(op_metrics->time_ps() + time_ps); | ||||
|   op_metrics->set_self_time_ps(op_metrics->self_time_ps() + self_time_ps); | ||||
| @ -72,7 +72,7 @@ void DeviceOpMetricsDbBuilder::EnterOp(uint64 program_id, | ||||
|                                                     : string(category)); | ||||
|   if (op_metrics->provenance().empty()) | ||||
|     op_metrics->set_provenance(string(provenance)); | ||||
|   op_metrics->set_is_eager(is_eager); | ||||
|   op_metrics->set_is_eager(op_metrics->is_eager() || is_eager); | ||||
|   op_metrics->set_occurrences(op_metrics->occurrences() + occurrences); | ||||
|   op_metrics->set_time_ps(op_metrics->time_ps() + time_ps); | ||||
|   op_metrics->set_self_time_ps(op_metrics->self_time_ps() + self_time_ps); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user