mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
Fix inconsistency in enum names in the C API (#277)
* Fix inconsistency in enum names in the C API * fix build
This commit is contained in:
parent
251d4bbb23
commit
de383d93be
4 changed files with 10 additions and 10 deletions
|
|
@ -92,11 +92,11 @@ typedef enum ONNXType {
|
|||
} ONNXType;
|
||||
|
||||
typedef enum OrtLoggingLevel {
|
||||
ORT_LOGGING_LEVEL_kVERBOSE,
|
||||
ORT_LOGGING_LEVEL_kINFO,
|
||||
ORT_LOGGING_LEVEL_kWARNING,
|
||||
ORT_LOGGING_LEVEL_kERROR,
|
||||
ORT_LOGGING_LEVEL_kFATAL,
|
||||
ORT_LOGGING_LEVEL_VERBOSE,
|
||||
ORT_LOGGING_LEVEL_INFO,
|
||||
ORT_LOGGING_LEVEL_WARNING,
|
||||
ORT_LOGGING_LEVEL_ERROR,
|
||||
ORT_LOGGING_LEVEL_FATAL,
|
||||
} OrtLoggingLevel;
|
||||
|
||||
typedef enum OrtErrorCode {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ int real_main(int argc, char* argv[]) {
|
|||
bool enable_cuda = false;
|
||||
bool enable_mkl = false;
|
||||
bool enable_nuphar = false;
|
||||
OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_kWARNING;
|
||||
OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING;
|
||||
{
|
||||
int ch;
|
||||
while ((ch = getopt(argc, argv, ORT_TSTR("Ac:hj:m:n:r:e:xv"))) != -1) {
|
||||
|
|
@ -91,7 +91,7 @@ int real_main(int argc, char* argv[]) {
|
|||
enable_cpu_mem_arena = false;
|
||||
break;
|
||||
case 'v':
|
||||
logging_level = ORT_LOGGING_LEVEL_kINFO;
|
||||
logging_level = ORT_LOGGING_LEVEL_INFO;
|
||||
break;
|
||||
case 'c':
|
||||
concurrent_session_runs = static_cast<int>(MyStrtol<PATH_CHAR_TYPE>(optarg, nullptr, 10));
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ int main(int argc, char* argv[]) {
|
|||
char* input_file = argv[2];
|
||||
char* output_file = argv[3];
|
||||
OrtEnv* env;
|
||||
ORT_ABORT_ON_ERROR(OrtInitialize(ORT_LOGGING_LEVEL_kWARNING, "test", &env));
|
||||
ORT_ABORT_ON_ERROR(OrtInitialize(ORT_LOGGING_LEVEL_WARNING, "test", &env));
|
||||
OrtSessionOptions* session_option = OrtCreateSessionOptions();
|
||||
#ifdef USE_CUDA
|
||||
enable_cuda(session_option);
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ class CApiTestImpl : public ::testing::Test {
|
|||
|
||||
void SetUp() override {
|
||||
if (use_customer_logger) {
|
||||
ORT_THROW_ON_ERROR(OrtInitializeWithCustomLogger(MyLoggingFunction, nullptr, ORT_LOGGING_LEVEL_kINFO, "Default", &env));
|
||||
ORT_THROW_ON_ERROR(OrtInitializeWithCustomLogger(MyLoggingFunction, nullptr, ORT_LOGGING_LEVEL_INFO, "Default", &env));
|
||||
} else {
|
||||
ORT_THROW_ON_ERROR(OrtInitialize(ORT_LOGGING_LEVEL_kINFO, "Default", &env));
|
||||
ORT_THROW_ON_ERROR(OrtInitialize(ORT_LOGGING_LEVEL_INFO, "Default", &env));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue