You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

errorcode.h 2.1 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * Copyright 2019 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef PREDICT_INCLUDE_ERRORCODE_H_
  17. #define PREDICT_INCLUDE_ERRORCODE_H_
  18. namespace mindspore {
  19. namespace predict {
  20. using STATUS = int;
  21. /* Success */
  22. constexpr int RET_OK = 0; /**< No error occurs. */
  23. /* Common error code, range: [-1, -100]*/
  24. constexpr int RET_ERROR = -1; /**< Common error code. */
  25. constexpr int RET_NULL_PTR = -2; /**< NULL pointer returned.*/
  26. constexpr int RET_PARAM_INVALID = -3; /**< Invalid parameter.*/
  27. constexpr int RET_NO_CHANGE = -4; /**< No change. */
  28. /* Executor error code, range: [-101,-200] */
  29. constexpr int RET_OUT_OF_TENSOR_RANGE = -101; /**< Failed to checking range. */
  30. constexpr int RET_INPUT_TENSOR_ERROR = -102; /**< Failed to checking input tensor. */
  31. constexpr int RET_REENTRANT_ERROR = -103; /**< Exist executor running. */
  32. /* Graph error code, range: [-201,-300] */
  33. constexpr int RET_GRAPH_FILE_ERR = -201; /**< Failed to verify graph file. */
  34. /* Node error code, range: [-301,-400] */
  35. constexpr int RET_NOT_FIND_OP = -301; /**< Failed to find OP. */
  36. constexpr int RET_INVALID_OP_NAME = -302; /**< Invalid OP name. */
  37. constexpr int RET_INVALID_OP_ATTR = -303; /**< Invalid OP attr. */
  38. constexpr int RET_OP_EXECUTE_FAILURE = -304; /**< Failed to execution OP. */
  39. /* Tensor error code, range: [-401,-500] */
  40. constexpr int RET_FORMAT_ERR = -401; /**< Failed to checking tensor format. */
  41. } // namespace predict
  42. } // namespace mindspore
  43. #endif // PREDICT_INCLUDE_ERRORCODE_H_