Skip to content

Commit 1512f14

Browse files
author
Darshak Bhatti
committed
cleanup
1 parent 13aeb82 commit 1512f14

File tree

6 files changed

+7
-15
lines changed

6 files changed

+7
-15
lines changed

onnxruntime/core/platform/telemetry.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,8 @@ void Telemetry::LogSessionCreationEnd(uint32_t session_id,
172172
ORT_UNUSED_PARAMETER(status);
173173
}
174174

175-
void Telemetry::LogRunStart(uint32_t session_id, uint64_t run_id) const {
175+
void Telemetry::LogRunStart(uint32_t session_id) const {
176176
ORT_UNUSED_PARAMETER(session_id);
177-
ORT_UNUSED_PARAMETER(run_id);
178177
}
179178

180179
void Telemetry::LogRegisterEpLibraryWithLibPath(const std::string& registration_name,

onnxruntime/core/platform/telemetry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Telemetry {
108108
virtual void LogSessionCreationEnd(uint32_t session_id,
109109
const common::Status& status) const;
110110

111-
virtual void LogRunStart(uint32_t session_id, uint64_t run_id) const;
111+
virtual void LogRunStart(uint32_t session_id) const;
112112

113113
virtual void LogRegisterEpLibraryWithLibPath(const std::string& registration_name,
114114
const std::string& lib_path) const;

onnxruntime/core/platform/windows/telemetry.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,6 @@ void WindowsTelemetry::LogRuntimePerf(uint32_t session_id, uint32_t total_runs_s
550550
TraceLoggingBool(true, "UTCReplace_AppSessionGuid"),
551551
TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance),
552552
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
553-
TraceLoggingLevel(WINEVENT_LEVEL_INFO),
554553
// Telemetry info
555554
TraceLoggingUInt8(0, "schemaVersion"),
556555
TraceLoggingUInt32(session_id, "sessionId"),
@@ -728,7 +727,7 @@ void WindowsTelemetry::LogSessionCreationEnd(uint32_t session_id,
728727
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
729728
}
730729

731-
void WindowsTelemetry::LogRunStart(uint32_t session_id, uint64_t run_id) const {
730+
void WindowsTelemetry::LogRunStart(uint32_t session_id) const {
732731
if (global_register_count_ == 0 || enabled_ == false)
733732
return;
734733

@@ -741,7 +740,6 @@ void WindowsTelemetry::LogRunStart(uint32_t session_id, uint64_t run_id) const {
741740
// Telemetry info
742741
TraceLoggingUInt8(0, "schemaVersion"),
743742
TraceLoggingUInt32(session_id, "sessionId"),
744-
TraceLoggingUInt64(run_id, "runId"),
745743
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
746744
}
747745

onnxruntime/core/platform/windows/telemetry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class WindowsTelemetry : public Telemetry {
101101
void LogSessionCreationEnd(uint32_t session_id,
102102
const common::Status& status) const override;
103103

104-
void LogRunStart(uint32_t session_id, uint64_t run_id) const override;
104+
void LogRunStart(uint32_t session_id) const override;
105105

106106
void LogRegisterEpLibraryWithLibPath(const std::string& registration_name,
107107
const std::string& lib_path) const override;

onnxruntime/core/session/inference_session.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3034,10 +3034,7 @@ Status InferenceSession::Run(const RunOptions& run_options,
30343034
Status retval = Status::OK();
30353035
const Env& env = Env::Default();
30363036

3037-
// Assign a unique run_id for telemetry correlation
3038-
const uint64_t run_id = run_id_counter_.fetch_add(1);
3039-
3040-
// Determine whether to emit Run telemetry (LogRunStart + LogRuntimePerf pair)
3037+
// Determine whether to emit Run telemetry
30413038
bool emit_run_telemetry = false;
30423039
{
30433040
std::lock_guard<std::mutex> telemetry_lock(telemetry_mutex_);
@@ -3047,7 +3044,7 @@ Status InferenceSession::Run(const RunOptions& run_options,
30473044
}
30483045

30493046
if (emit_run_telemetry) {
3050-
env.GetTelemetryProvider().LogRunStart(session_id_, run_id);
3047+
env.GetTelemetryProvider().LogRunStart(session_id_);
30513048
}
30523049

30533050
int graph_annotation_id = 0;
@@ -3245,7 +3242,7 @@ Status InferenceSession::Run(const RunOptions& run_options,
32453242
telemetry_.total_run_duration_since_last_ += TimeDiffMicroSeconds(tp);
32463243
telemetry_.duration_per_batch_size_[batch_size] += TimeDiffMicroSeconds(tp);
32473244

3248-
// Emit RuntimePerf paired with the LogRunStart that fired at entry
3245+
// Emit RuntimePerf
32493246
if (emit_run_telemetry) {
32503247
env.GetTelemetryProvider().LogRuntimePerf(session_id_, telemetry_.total_runs_since_last_,
32513248
telemetry_.total_run_duration_since_last_,

onnxruntime/core/session/inference_session.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,8 +982,6 @@ class InferenceSession {
982982
long long runtime_perf_interval_ = kRuntimePerfInitialInterval;
983983
} telemetry_;
984984

985-
std::atomic<uint64_t> run_id_counter_{0}; // monotonically increasing run id for correlation
986-
987985
mutable std::mutex telemetry_mutex_; // to ensure thread-safe access to telemetry data
988986

989987
#ifdef ONNXRUNTIME_ENABLE_INSTRUMENT

0 commit comments

Comments
 (0)