Skip to content

Commit 8c23ab9

Browse files
committed
update with VLOG(2) and fix a bug, new line at the EoF
1 parent a51d682 commit 8c23ab9

File tree

9 files changed

+20
-21
lines changed

9 files changed

+20
-21
lines changed

xla/backends/profiler/gpu/rocm_collector.cc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -621,15 +621,14 @@ std::vector<RocmTracerEvent> RocmTraceCollectorImpl::ApiActivityInfoExchange() {
621621

622622
if (api_event == api_events_map_.end()) {
623623
api_event = auxiliary_api_events_map_.find(activity_event.correlation_id);
624-
}
625-
626-
if (api_event == auxiliary_api_events_map_.end()) {
627-
OnEventsDropped(
628-
"An event from activity was discarded."
629-
"Could not find the counterpart HIP API.",
630-
activity_event.correlation_id);
631-
PrintRocmTracerEvent(activity_event, ". Dropped!");
632-
continue;
624+
if (api_event == auxiliary_api_events_map_.end()) {
625+
OnEventsDropped(
626+
"An event from activity was discarded."
627+
"Could not find the counterpart HIP API.",
628+
activity_event.correlation_id);
629+
PrintRocmTracerEvent(activity_event, ". Dropped!");
630+
continue;
631+
}
633632
}
634633

635634
switch (activity_event.type) {
@@ -684,4 +683,4 @@ std::unique_ptr<RocmTraceCollector> CreateRocmCollector(
684683
}
685684

686685
} // namespace profiler
687-
} // namespace xla
686+
} // namespace xla

xla/backends/profiler/gpu/rocm_collector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class RocmTraceCollectorImpl : public RocmTraceCollector {
178178

179179
void OnEventsDropped(const std::string& reason,
180180
uint32_t correlation_id) override {
181-
LOG(INFO) << "RocmTracerEvent dropped (correlation_id=" << correlation_id
181+
VLOG(2) << "RocmTracerEvent dropped (correlation_id=" << correlation_id
182182
<< ",) : " << reason << ".";
183183
}
184184

@@ -217,4 +217,4 @@ std::unique_ptr<RocmTraceCollector> CreateRocmCollector(
217217
} // namespace profiler
218218
} // namespace xla
219219

220-
#endif // XLA_BACKENDS_PROFILER_GPU_ROCM_COLLECTOR_H_
220+
#endif // XLA_BACKENDS_PROFILER_GPU_ROCM_COLLECTOR_H_

xla/backends/profiler/gpu/rocm_collector_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ TEST(RocmCollectorTest, TestAddKernelEventAndExport) {
113113

114114
} // namespace test
115115
} // namespace profiler
116-
} // namespace xla
116+
} // namespace xla

xla/backends/profiler/gpu/rocm_tracer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void RocmTracer::MemcpyEvent(const rocprofiler_record_header_t* hdr,
261261
.async = false,
262262
};
263263

264-
LOG(INFO) << "copy bytes: " << trace_event->memcpy_info.num_bytes
264+
VLOG(2) << "copy bytes: " << trace_event->memcpy_info.num_bytes
265265
<< " stream: " << trace_event->stream_id << " src_id "
266266
<< trace_event->device_id << " dst_id "
267267
<< trace_event->memcpy_info.destination;
@@ -573,4 +573,4 @@ extern "C" rocprofiler_tool_configure_result_t* rocprofiler_configure(
573573

574574
void __attribute__((constructor)) init_rocm_lib() {
575575
rocprofiler_force_configure(xla::profiler::rocprofiler_configure);
576-
}
576+
}

xla/backends/profiler/gpu/rocm_tracer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ class RocmTracer {
134134
} // namespace profiler
135135
} // namespace xla
136136

137-
#endif // XLA_BACKENDS_PROFILER_GPU_ROCM_TRACER_H_
137+
#endif // XLA_BACKENDS_PROFILER_GPU_ROCM_TRACER_H_

xla/backends/profiler/gpu/rocm_tracer_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@ TEST(RocmTracerTest, AnnotationMapWorks) {
118118

119119
} // namespace test
120120
} // namespace profiler
121-
} // namespace xla
121+
} // namespace xla

xla/backends/profiler/gpu/rocm_tracer_utils.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ absl::string_view AnnotationMap::LookUp(uint32_t correlation_id) {
9797
return it != map_.correlation_map.end() ? it->second : absl::string_view();
9898
}
9999

100-
} // namespace profiler
101-
} // namespace xla
100+
} // namespace profiler
101+
} // namespace xla

xla/backends/profiler/gpu/rocm_tracer_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,4 @@ class AnnotationMap {
203203
} // namespace profiler
204204
} // namespace xla
205205

206-
#endif // XLA_BACKENDS_PROFILER_GPU_ROCM_UTILS_H_
206+
#endif // XLA_BACKENDS_PROFILER_GPU_ROCM_UTILS_H_

xla/stream_executor/rocm/roctracer_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ limitations under the License.
3131
#include <rocm/include/rocprofiler-sdk/cxx/name_info.hpp>
3232
#include <rocm/include/rocprofiler-sdk/rocprofiler.h>
3333

34-
#endif // XLA_STREAM_EXECUTOR_ROCM_ROCTRACER_WRAPPER_H_
34+
#endif // XLA_STREAM_EXECUTOR_ROCM_ROCTRACER_WRAPPER_H_

0 commit comments

Comments
 (0)