File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -4001,7 +4001,7 @@ class ZeCollector {
40014001 }
40024002
40034003 void AggregateDeviceTimeStats () const {
4004- // do not acquire global_device_time_stats_mutex_. caller dos it.
4004+ // do not acquire global_device_time_stats_mutex_. caller does it.
40054005 for (auto it = global_device_time_stats_->begin (); it != global_device_time_stats_->end (); it++) {
40064006 std::string kname;
40074007 if (it->first .tile_ >= 0 ) {
Original file line number Diff line number Diff line change @@ -203,6 +203,13 @@ class UniTracer {
203203 ~UniTracer () {
204204 total_execution_time_ = correlator_.GetTimestamp ();
205205
206+ if (ze_collector_ != nullptr ) {
207+ ze_collector_->DisableTracing ();
208+ delete ze_collector_;
209+ }
210+
211+ // report after ze_collector_ is destructed
212+ // local stats are sweeped in deconstructor
206213 Report ();
207214
208215 ClExtCollector::Destroy ();
@@ -213,14 +220,6 @@ class UniTracer {
213220 cl_gpu_collector_->DisableTracing ();
214221 }
215222
216- if (ze_collector_ != nullptr ) {
217- ze_collector_->DisableTracing ();
218- }
219-
220- if (ze_collector_ != nullptr ) {
221- delete ze_collector_;
222- }
223-
224223 if (itt_collector != nullptr ){
225224 // Print CCL summary before deleting the object
226225 // If CCL summary is not enbled summary string will be empty
You can’t perform that action at this time.
0 commit comments