Skip to content

Commit

Permalink
Rename rundown to captureState
Browse files Browse the repository at this point in the history
  • Loading branch information
ivberg committed Feb 3, 2024
1 parent e50c606 commit 2086d76
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion onnxruntime/core/framework/execution_providers.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class ExecutionProviders {
#ifdef _WIN32
LogProviderOptions(provider_id, providerOptions, false);

// Register callback for ETW capture state (rundown)
WindowsTelemetry::RegisterInternalCallback(
[this](
LPCGUID SourceId,
Expand Down Expand Up @@ -96,7 +97,7 @@ class ExecutionProviders {
TraceLoggingString(provider_id.c_str(), "ProviderId"),
TraceLoggingString(config_pair.first.c_str(), "Key"),
TraceLoggingString(config_pair.second.c_str(), "Value"),
TraceLoggingBool(captureState, "CaptureState"));
TraceLoggingBool(captureState, "isCaptureState"));
}
}
#endif
Expand Down
11 changes: 6 additions & 5 deletions onnxruntime/core/session/inference_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ void InferenceSession::ConstructorCommon(const SessionOptions& session_options,
active_sessions_[global_session_id_++] = this;

#ifdef _WIN32
// Register callback for ETW capture state (rundown)
WindowsTelemetry::RegisterInternalCallback(
[this](
LPCGUID SourceId,
Expand Down Expand Up @@ -506,8 +507,8 @@ void InferenceSession::ConstructorCommon(const SessionOptions& session_options,
telemetry_ = {};
}

void InferenceSession::TraceSessionOptions(const SessionOptions& session_options, bool rundown) {
(void)rundown; // Otherwise Linux build error
void InferenceSession::TraceSessionOptions(const SessionOptions& session_options, bool captureState) {
(void)captureState; // Otherwise Linux build error

LOGS(*session_logger_, INFO) << session_options;

Expand All @@ -532,7 +533,7 @@ void InferenceSession::TraceSessionOptions(const SessionOptions& session_options
TraceLoggingBoolean(session_options.use_per_session_threads, "use_per_session_threads"),
TraceLoggingBoolean(session_options.thread_pool_allow_spinning, "thread_pool_allow_spinning"),
TraceLoggingBoolean(session_options.use_deterministic_compute, "use_deterministic_compute"),
TraceLoggingBoolean(rundown, "isRundown"));
TraceLoggingBoolean(captureState, "isCaptureState"));

TraceLoggingWrite(
telemetry_provider_handle,
Expand All @@ -546,7 +547,7 @@ void InferenceSession::TraceSessionOptions(const SessionOptions& session_options
TraceLoggingUInt32(session_options.intra_op_param.stack_size, "stack_size"),
TraceLoggingString(!session_options.intra_op_param.affinity_str.empty() ? session_options.intra_op_param.affinity_str.c_str() : "", "affinity_str"),
TraceLoggingBoolean(session_options.intra_op_param.set_denormal_as_zero, "set_denormal_as_zero"),
TraceLoggingBoolean(rundown, "isRundown"));
TraceLoggingBoolean(captureState, "isCaptureState"));

for (const auto& config_pair : session_options.config_options.configurations) {
TraceLoggingWrite(
Expand All @@ -556,7 +557,7 @@ void InferenceSession::TraceSessionOptions(const SessionOptions& session_options
TraceLoggingLevel(WINEVENT_LEVEL_INFO),
TraceLoggingString(config_pair.first.c_str(), "Key"),
TraceLoggingString(config_pair.second.c_str(), "Value"),
TraceLoggingBoolean(rundown, "isRundown"));
TraceLoggingBoolean(captureState, "isCaptureState"));
}
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/session/inference_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ class InferenceSession {

void InitLogger(logging::LoggingManager* logging_manager);

void TraceSessionOptions(const SessionOptions& session_options, bool rundown);
void TraceSessionOptions(const SessionOptions& session_options, bool captureState);

[[nodiscard]] common::Status CheckShapes(const std::string& input_name, const TensorShape& input_shape,
const TensorShape& expected_shape, const char* input_output_moniker) const;
Expand Down

0 comments on commit 2086d76

Please sign in to comment.