From 42c18762f3825d0df9437ccf3f8345a605e962fa Mon Sep 17 00:00:00 2001 From: Hector Li Date: Tue, 9 Jul 2019 16:54:40 -0700 Subject: [PATCH] Update the log message for fallback case. (#1370) Log a warning if the fallback is caused by functional limitation Log a information if the fallback is by design. e.g Nodes between Shape (CPU output) -> CUDA nodes .. -> ReShape (CPU input) --- onnxruntime/core/providers/cuda/cuda_execution_provider.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/cuda/cuda_execution_provider.cc b/onnxruntime/core/providers/cuda/cuda_execution_provider.cc index a2854e3b63..cd0d1c5b7d 100644 --- a/onnxruntime/core/providers/cuda/cuda_execution_provider.cc +++ b/onnxruntime/core/providers/cuda/cuda_execution_provider.cc @@ -1083,7 +1083,11 @@ CUDAExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph, if (!force_inside && (not_supported || force_outside)) { defs_outside_cuda.insert(node.OutputDefs().cbegin(), node.OutputDefs().cend()); - LOGS_DEFAULT(WARNING) << "Fallback to CPU execution provider for Op type: " << node.OpType() << " node name: " << node.Name(); + if (not_supported) { + LOGS_DEFAULT(WARNING) << "CUDA kernel not supported. Fallback to CPU execution provider for Op type: " << node.OpType() << " node name: " << node.Name(); + } else if (force_outside) { + LOGS_DEFAULT(INFO) << "Force fallback to CPU execution provider for Op type: " << node.OpType() << " node name: " << node.Name(); + } } else { // for nodes placed on CUDA, check if its output is on CPU node.ForEachWithIndex(