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:
Pranav Sharma 2019-01-04 16:41:15 -08:00 committed by GitHub
parent 251d4bbb23
commit de383d93be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View file

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

View file

@ -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));

View file

@ -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);

View file

@ -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));
}
}