Skip to content

Commit 76916b6

Browse files
Profiler Teamcopybara-github
authored andcommitted
Project import generated by Copybara
PiperOrigin-RevId: 829261364
1 parent e26a56c commit 76916b6

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

xprof/convert/multi_xplanes_to_op_stats.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ absl::Status ConvertMultiXSpacesToCombinedOpStats(
6262
}
6363

6464
// Do not limit the maximum number of steps during the merge of OpStats.
65-
StepIntersection step_intersection =
66-
ComputeStepIntersectionToMergeOpStats(all_op_stats_info, kuint32max);
65+
StepIntersection step_intersection = ComputeStepIntersectionToMergeOpStats(
66+
all_op_stats_info, std::numeric_limits<uint32_t>::max());
6767
CombineAllOpStats(all_op_stats_info, step_intersection, combined_op_stats);
6868

6969
return absl::OkStatus();

xprof/convert/op_metrics_db_combiner.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void CombineMemoryAccessedBreakdown(
9999
const tsl::protobuf::RepeatedPtrField<OpMetrics_MemoryAccessed>& src,
100100
tsl::protobuf::RepeatedPtrField<OpMetrics_MemoryAccessed>* dst) {
101101
if (src.empty()) return;
102-
absl::flat_hash_map<std::pair<tsl::uint64 /*memory_space*/, OperationType>,
102+
absl::flat_hash_map<std::pair<uint64_t /*memory_space*/, OperationType>,
103103
OpMetrics_MemoryAccessed*>
104104
dst_memory_accessed_map;
105105
for (auto& dst_memory_accessed : *dst) {
@@ -108,7 +108,7 @@ void CombineMemoryAccessedBreakdown(
108108
&dst_memory_accessed;
109109
}
110110
for (const auto& src_memory_accessed : src) {
111-
tsl::uint64 memory_space = src_memory_accessed.memory_space();
111+
uint64_t memory_space = src_memory_accessed.memory_space();
112112
OperationType operation_type = src_memory_accessed.operation_type();
113113
auto*& dst_memory_accessed =
114114
dst_memory_accessed_map[{memory_space, operation_type}];

xprof/convert/op_stats_processor.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ absl::Status OpStatsProcessor::Reduce(
161161
ParseHardwareType(op_stats_copy[i].run_environment().device_type()), i);
162162
}
163163

164-
StepIntersection step_intersection =
165-
ComputeStepIntersectionToMergeOpStats(all_op_stats_info, kuint32max);
164+
StepIntersection step_intersection = ComputeStepIntersectionToMergeOpStats(
165+
all_op_stats_info, std::numeric_limits<uint32_t>::max());
166166
OpStats combined_op_stats;
167167
CombineAllOpStats(all_op_stats_info, step_intersection, &combined_op_stats);
168168

xprof/convert/op_stats_to_pod_stats.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PodStatsRecord CreatePodStatsRecord(absl::string_view host_name,
4444
GenericStepBreakdown generic;
4545
bool success = step_info.step_breakdown().UnpackTo(&generic);
4646
DCHECK(success);
47-
record.set_host_name(tsl::string(host_name));
47+
record.set_host_name(host_name);
4848
record.set_step_num(step_info.step_num());
4949
record.set_total_duration_us(
5050
tsl::profiler::PicoToMicro(step_info.duration_ps()));

xprof/convert/xplane_to_op_metrics_db.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ OpMetricsDb ConvertDeviceTraceXPlaneToOpMetricsDb(
385385
OpMetricsDb result;
386386
DeviceOpMetricsDbBuilder device_op_metrics_db_builder(&result);
387387

388-
int64_t first_op_offset_ps = tsl::kint64max;
388+
int64_t first_op_offset_ps = std::numeric_limits<int64_t>::max();
389389
int64_t last_op_offset_ps = 0;
390390
int64_t num_tf_ops = 0;
391391

0 commit comments

Comments
 (0)