Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/onnxruntime_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <locale>
#include <string>
#include <thread>

#include "onnxruntime_utils.h"

namespace triton { namespace backend { namespace onnxruntime {
Expand All @@ -55,9 +56,9 @@ OnnxLoader::Init(common::TritonJson::Value& backend_config)
OrtLoggingLevel logging_level =
TRITONSERVER_LogIsEnabled(TRITONSERVER_LOG_VERBOSE)
? ORT_LOGGING_LEVEL_VERBOSE
: TRITONSERVER_LogIsEnabled(TRITONSERVER_LOG_WARN)
? ORT_LOGGING_LEVEL_WARNING
: ORT_LOGGING_LEVEL_ERROR;
: TRITONSERVER_LogIsEnabled(TRITONSERVER_LOG_WARN)
? ORT_LOGGING_LEVEL_WARNING
: ORT_LOGGING_LEVEL_ERROR;

// Controls whether to enable global threadpool which will be shared across
// sessions. Use this in conjunction with DisablePerSessionThreads API or
Expand Down Expand Up @@ -110,7 +111,6 @@ OnnxLoader::Init(common::TritonJson::Value& backend_config)
status = ort_api->CreateEnv(logging_level, "log", &env);
}

status = ort_api->CreateEnv(logging_level, "log", &env);
loader.reset(new OnnxLoader(env, global_threadpool_enabled));
RETURN_IF_ORT_ERROR(status);
} else {
Expand Down