* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_LITE_INCLUDE_ERRORCODE_H_
#define MINDSPORE_LITE_INCLUDE_ERRORCODE_H_
#include "include/lite_utils.h"
namespace mindspore {
namespace lite {
using STATUS = int;
constexpr int RET_OK = 0;
constexpr int RET_ERROR = -1;
constexpr int RET_NULL_PTR = -2;
constexpr int RET_PARAM_INVALID = -3;
constexpr int RET_NO_CHANGE = -4;
constexpr int RET_SUCCESS_EXIT = -5;
constexpr int RET_MEMORY_FAILED = -6;
constexpr int RET_NOT_SUPPORT = -7;
constexpr int RET_THREAD_POOL_ERROR = -8;
constexpr int RET_OUT_OF_TENSOR_RANGE = -100;
constexpr int RET_INPUT_TENSOR_ERROR = -101;
constexpr int RET_REENTRANT_ERROR = -102;
constexpr int RET_GRAPH_FILE_ERR = -200;
constexpr int RET_NOT_FIND_OP = -300;
constexpr int RET_INVALID_OP_NAME = -301;
constexpr int RET_INVALID_OP_ATTR = -302;
constexpr int RET_OP_EXECUTE_FAILURE = -303;
constexpr int RET_FORMAT_ERR = -400;
constexpr int RET_INFER_ERR = -500;
constexpr int RET_INFER_INVALID = -501;
constexpr int RET_INPUT_PARAM_INVALID = -600;
String GetErrorInfo(STATUS error_code);
}
}
#endif