From 891b50cc683bf3437c04a228a17b4450fefbd9cf Mon Sep 17 00:00:00 2001 From: Bowen Bao Date: Fri, 6 Oct 2023 17:03:26 -0700 Subject: [PATCH] General INFO logging tracking occurance of GraphTransformer modification (#17819) ### Description Adds logging to `GraphTransformer::Apply` whether modification has taken place or not. ### Motivation and Context A general high level info logging to track which optimization occurred for a given model. To help improve dynamo exported model performance by monitoring the difference of triggered transformations between that of torchscript exported model. --- onnxruntime/core/optimizer/graph_transformer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/onnxruntime/core/optimizer/graph_transformer.cc b/onnxruntime/core/optimizer/graph_transformer.cc index ba580b8105..37093496a6 100644 --- a/onnxruntime/core/optimizer/graph_transformer.cc +++ b/onnxruntime/core/optimizer/graph_transformer.cc @@ -12,6 +12,7 @@ Status GraphTransformer::Apply(Graph& graph, bool& modified, const logging::Logg // ORT_RETURN_IF_ERROR(graph.Resolve()); auto status = ApplyImpl(graph, modified, 0, logger); + LOGS(logger, INFO) << "GraphTransformer " << Name() << " modified: " << modified << " with status: " << status; ORT_RETURN_IF_ERROR(status); #if !defined(ORT_MINIMAL_BUILD)