Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavsharma committed Aug 14, 2019
1 parent b6f872f commit 52bc152
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions onnxruntime/python/onnxruntime_pybind_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <numpy/arrayobject.h>

#include "core/graph/graph_viewer.h"
#include "core/common/logging/logging.h"
#include "core/common/logging/severity.h"

#if USE_CUDA
#define BACKEND_PROC "GPU"
Expand Down Expand Up @@ -415,7 +417,7 @@ This parameter is unused unless *enable_sequential_execution* is false.)pbdoc")
.def_property_readonly(
"graph_optimization_level",
[](const SessionOptions* options) -> GraphOptimizationLevel {
GraphOptimizationLevel retval = ORT_ENABLE_EXTENDED;
GraphOptimizationLevel retval = ORT_ENABLE_BASIC;
switch (options->graph_optimization_level) {
case onnxruntime::TransformerLevel::Default:
retval = ORT_DISABLE_ALL;
Expand All @@ -430,7 +432,8 @@ This parameter is unused unless *enable_sequential_execution* is false.)pbdoc")
retval = ORT_ENABLE_ALL;
break;
default:
retval = ORT_ENABLE_BASIC; // should we log a warning here?
retval = ORT_ENABLE_BASIC;
LOGS_DEFAULT(WARNING) << "Got invalid graph optimization level; defaulting to ORT_ENABLE_BASIC";
break;
}
return retval;
Expand Down

0 comments on commit 52bc152

Please sign in to comment.