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 1.8 kB

5 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * Copyright 2020 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 MINDSPORE_LITE_NNACL_ERRORCODE_H_
  17. #define MINDSPORE_LITE_NNACL_ERRORCODE_H_
  18. typedef enum ErrorCodeCommonEnum {
  19. NNACL_OK = 0,
  20. NNACL_ERR = 1,
  21. NNACL_NULL_PTR,
  22. NNACL_PARAM_INVALID,
  23. NNACL_COMMON_END = 9999
  24. } ErrorCodeCommonEnum;
  25. typedef enum ErrorCodeFp32OpEnum {
  26. NNACL_ERRCODE_OP_FP32_START = 10000,
  27. NNACL_ERRCODE_STRASSEN_RECURSION_MALLOC,
  28. NNACL_ERRCODE_REVERSE_MALLOC,
  29. NNACL_ERRCODE_SQRT_NEGATIVE,
  30. NNACL_ERRCODE_RSQRT_NEGATIVE_OR_ZERO,
  31. NNACL_ERRCODE_LOG_NEGATIVE_OR_ZERO,
  32. NNACL_ERRCODE_DIVISOR_ZERO,
  33. NNACL_ERRCODE_INDEX_OUT_OF_RANGE,
  34. NNACL_ERRCODE_WINOGRAD_GENERATOR_ERROR,
  35. NNACL_ERRCODE_OP_FP32_END = 19999
  36. } ErrorCodeFp32OpEnum;
  37. typedef enum ErrorCodeFp16OpEnum {
  38. NNACL_ERRCODE_OP_FP16_START = 20000,
  39. NNACL_ERRCODE_OP_FP16_WINOGRAD_GENERATOR,
  40. NNACL_ERRCODE_OP_FP16_END = 29999
  41. } ErrorCodeFp16OpEnum;
  42. typedef enum ErrorCodeUint8OpEnum {
  43. NNACL_ERRCODE_OP_UINT8_START = 30000,
  44. NNACL_ERRCODE_OP_UINT8_END = 39999
  45. } ErrorCodeUint8OpEnum;
  46. typedef enum ErrorCodeInt8OpEnum {
  47. NNACL_ERRCODE_OP_INT8_START = 40000,
  48. NNACL_ERRCODE_ADD_OVERFLOW,
  49. NNACL_ERRCODE_MUL_OVERFLOW,
  50. NNACL_ERRCODE_OP_INT8_END = 49999
  51. } ErrorCodeInt8OpEnums;
  52. #endif // MINDSPORE_LITE_NNACL_ERRORCODE_H_