Skip to content

Commit d301fe4

Browse files
skottmckayankitm3k
authored andcommittedDec 11, 2024
Reduce default logger usage (microsoft#23030)
### Description <!-- Describe your changes. --> We have use cases where multiple sessions are created concurrently. Minimizing the usage of the default logger is important for these scenarios. Wire through the session logger to as many places as possible. The EP logger can also be used once the session is created (can't be used during EP construction/kernel registration but can be used in GetCapability and Compile). ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Improve logging when there are concurrent sessions.
1 parent 33b526d commit d301fe4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎onnxruntime/core/providers/webgpu/webgpu_execution_provider.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,8 @@ std::vector<std::unique_ptr<ComputeCapability>> WebGpuExecutionProvider::GetCapa
798798
candidates.push_back(node.Index());
799799
tenative_candidates.push_back(node.Index());
800800
}
801-
auto cpu_nodes = GetCpuPreferredNodes(graph, kernel_lookup, tenative_candidates);
801+
802+
auto cpu_nodes = GetCpuPreferredNodes(graph, kernel_lookup, tenative_candidates, *GetLogger());
802803
std::vector<std::unique_ptr<ComputeCapability>> result;
803804
for (auto& node_index : candidates) {
804805
if (cpu_nodes.count(node_index) > 0) {

0 commit comments

Comments
 (0)
Please sign in to comment.