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)
This commit is contained in:
Hector Li 2019-07-09 16:54:40 -07:00 committed by GitHub
parent c483a1e3c6
commit 42c18762f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(