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.

rt_error_codes.h 8.5 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /**
  2. * Copyright 2019-2022 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 __INC_EXTERNEL_RT_ERROR_CODES_H__
  17. #define __INC_EXTERNEL_RT_ERROR_CODES_H__
  18. #include <stddef.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. static const int32_t ACL_RT_SUCCESS = 0; // success
  23. static const int32_t ACL_ERROR_RT_PARAM_INVALID = 107000; // param invalid
  24. static const int32_t ACL_ERROR_RT_INVALID_DEVICEID = 107001; // invalid device id
  25. static const int32_t ACL_ERROR_RT_CONTEXT_NULL = 107002; // current context null
  26. static const int32_t ACL_ERROR_RT_STREAM_CONTEXT = 107003; // stream not in current context
  27. static const int32_t ACL_ERROR_RT_MODEL_CONTEXT = 107004; // model not in current context
  28. static const int32_t ACL_ERROR_RT_STREAM_MODEL = 107005; // stream not in model
  29. static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_INVALID = 107006; // event timestamp invalid
  30. static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_REVERSAL = 107007; // event timestamp reversal
  31. static const int32_t ACL_ERROR_RT_ADDR_UNALIGNED = 107008; // memory address unaligned
  32. static const int32_t ACL_ERROR_RT_FILE_OPEN = 107009; // open file failed
  33. static const int32_t ACL_ERROR_RT_FILE_WRITE = 107010; // write file failed
  34. static const int32_t ACL_ERROR_RT_STREAM_SUBSCRIBE = 107011; // error subscribe stream
  35. static const int32_t ACL_ERROR_RT_THREAD_SUBSCRIBE = 107012; // error subscribe thread
  36. static const int32_t ACL_ERROR_RT_GROUP_NOT_SET = 107013; // group not set
  37. static const int32_t ACL_ERROR_RT_GROUP_NOT_CREATE = 107014; // group not create
  38. static const int32_t ACL_ERROR_RT_STREAM_NO_CB_REG = 107015; // callback not register to stream
  39. static const int32_t ACL_ERROR_RT_INVALID_MEMORY_TYPE = 107016; // invalid memory type
  40. static const int32_t ACL_ERROR_RT_INVALID_HANDLE = 107017; // invalid handle
  41. static const int32_t ACL_ERROR_RT_INVALID_MALLOC_TYPE = 107018; // invalid malloc type
  42. static const int32_t ACL_ERROR_RT_WAIT_TIMEOUT = 107019; // wait timeout
  43. static const int32_t ACL_ERROR_RT_FEATURE_NOT_SUPPORT = 207000; // feature not support
  44. static const int32_t ACL_ERROR_RT_MEMORY_ALLOCATION = 207001; // memory allocation error
  45. static const int32_t ACL_ERROR_RT_MEMORY_FREE = 207002; // memory free error
  46. static const int32_t ACL_ERROR_RT_AICORE_OVER_FLOW = 207003; // aicore over flow
  47. static const int32_t ACL_ERROR_RT_NO_DEVICE = 207004; // no device
  48. static const int32_t ACL_ERROR_RT_RESOURCE_ALLOC_FAIL = 207005; // resource alloc fail
  49. static const int32_t ACL_ERROR_RT_NO_PERMISSION = 207006; // no permission
  50. static const int32_t ACL_ERROR_RT_NO_EVENT_RESOURCE = 207007; // no event resource
  51. static const int32_t ACL_ERROR_RT_NO_STREAM_RESOURCE = 207008; // no stream resource
  52. static const int32_t ACL_ERROR_RT_NO_NOTIFY_RESOURCE = 207009; // no notify resource
  53. static const int32_t ACL_ERROR_RT_NO_MODEL_RESOURCE = 207010; // no model resource
  54. static const int32_t ACL_ERROR_RT_NO_CDQ_RESOURCE = 207011; // no cdq resource
  55. static const int32_t ACL_ERROR_RT_OVER_LIMIT = 207012; // over limit
  56. static const int32_t ACL_ERROR_RT_QUEUE_EMPTY = 207013; // queue is empty
  57. static const int32_t ACL_ERROR_RT_QUEUE_FULL = 207014; // queue is full
  58. static const int32_t ACL_ERROR_RT_REPEATED_INIT = 207015; // repeated init
  59. static const int32_t ACL_ERROR_RT_AIVEC_OVER_FLOW = 207016; // aivec over flow
  60. static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error
  61. static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error
  62. static const int32_t ACL_ERROR_RT_STREAM_TASK_FULL = 507002; // task full in stream
  63. static const int32_t ACL_ERROR_RT_STREAM_TASK_EMPTY = 507003; // task empty in stream
  64. static const int32_t ACL_ERROR_RT_STREAM_NOT_COMPLETE = 507004; // stream not complete
  65. static const int32_t ACL_ERROR_RT_END_OF_SEQUENCE = 507005; // end of sequence
  66. static const int32_t ACL_ERROR_RT_EVENT_NOT_COMPLETE = 507006; // event not complete
  67. static const int32_t ACL_ERROR_RT_CONTEXT_RELEASE_ERROR = 507007; // context release error
  68. static const int32_t ACL_ERROR_RT_SOC_VERSION = 507008; // soc version error
  69. static const int32_t ACL_ERROR_RT_TASK_TYPE_NOT_SUPPORT = 507009; // task type not support
  70. static const int32_t ACL_ERROR_RT_LOST_HEARTBEAT = 507010; // ts lost heartbeat
  71. static const int32_t ACL_ERROR_RT_MODEL_EXECUTE = 507011; // model execute failed
  72. static const int32_t ACL_ERROR_RT_REPORT_TIMEOUT = 507012; // report timeout
  73. static const int32_t ACL_ERROR_RT_SYS_DMA = 507013; // sys dma error
  74. static const int32_t ACL_ERROR_RT_AICORE_TIMEOUT = 507014; // aicore timeout
  75. static const int32_t ACL_ERROR_RT_AICORE_EXCEPTION = 507015; // aicore exception
  76. static const int32_t ACL_ERROR_RT_AICORE_TRAP_EXCEPTION = 507016; // aicore trap exception
  77. static const int32_t ACL_ERROR_RT_AICPU_TIMEOUT = 507017; // aicpu timeout
  78. static const int32_t ACL_ERROR_RT_AICPU_EXCEPTION = 507018; // aicpu exception
  79. static const int32_t ACL_ERROR_RT_AICPU_DATADUMP_RSP_ERR = 507019; // aicpu datadump response error
  80. static const int32_t ACL_ERROR_RT_AICPU_MODEL_RSP_ERR = 507020; // aicpu model operate response error
  81. static const int32_t ACL_ERROR_RT_PROFILING_ERROR = 507021; // profiling error
  82. static const int32_t ACL_ERROR_RT_IPC_ERROR = 507022; // ipc error
  83. static const int32_t ACL_ERROR_RT_MODEL_ABORT_NORMAL = 507023; // model abort normal
  84. static const int32_t ACL_ERROR_RT_KERNEL_UNREGISTERING = 507024; // kernel unregistering
  85. static const int32_t ACL_ERROR_RT_RINGBUFFER_NOT_INIT = 507025; // ringbuffer not init
  86. static const int32_t ACL_ERROR_RT_RINGBUFFER_NO_DATA = 507026; // ringbuffer no data
  87. static const int32_t ACL_ERROR_RT_KERNEL_LOOKUP = 507027; // kernel lookup error
  88. static const int32_t ACL_ERROR_RT_KERNEL_DUPLICATE = 507028; // kernel register duplicate
  89. static const int32_t ACL_ERROR_RT_DEBUG_REGISTER_FAIL = 507029; // debug register failed
  90. static const int32_t ACL_ERROR_RT_DEBUG_UNREGISTER_FAIL = 507030; // debug unregister failed
  91. static const int32_t ACL_ERROR_RT_LABEL_CONTEXT = 507031; // label not in current context
  92. static const int32_t ACL_ERROR_RT_PROGRAM_USE_OUT = 507032; // program register num use out
  93. static const int32_t ACL_ERROR_RT_DEV_SETUP_ERROR = 507033; // device setup error
  94. static const int32_t ACL_ERROR_RT_VECTOR_CORE_TIMEOUT = 507034; // vector core timeout
  95. static const int32_t ACL_ERROR_RT_VECTOR_CORE_EXCEPTION = 507035; // vector core exception
  96. static const int32_t ACL_ERROR_RT_VECTOR_CORE_TRAP_EXCEPTION = 507036; // vector core trap exception
  97. static const int32_t ACL_ERROR_RT_CDQ_BATCH_ABNORMAL = 507037; // cdq alloc batch abnormal
  98. static const int32_t ACL_ERROR_RT_DIE_MODE_CHANGE_ERROR = 507038; // can not change die mode
  99. static const int32_t ACL_ERROR_RT_DIE_SET_ERROR = 507039; // single die mode can not set die
  100. static const int32_t ACL_ERROR_RT_INVALID_DIEID = 507040; // invalid die id
  101. static const int32_t ACL_ERROR_RT_DIE_MODE_NOT_SET = 507041; // die mode not set
  102. static const int32_t ACL_ERROR_RT_DRV_INTERNAL_ERROR = 507899; // drv internal error
  103. static const int32_t ACL_ERROR_RT_AICPU_INTERNAL_ERROR = 507900; // aicpu internal error
  104. static const int32_t ACL_ERROR_RT_SOCKET_CLOSE = 507901; // hdc disconnect
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108. #endif // __INC_EXTERNEL_RT_ERROR_CODES_H__

图引擎模块(GE)是MindSpore的一个子模块,其代码由C++实现,位于前端模块ME和底层硬件之间,起到承接作用。图引擎模块以ME下发的图作为输入,然后进行一系列的深度图优化操作,最后输出一张可以在底层硬件上高效运行的图。GE针对昇腾AI处理器的硬件结构特点,做了特定的优化工作,以此来充分发挥出昇腾AI处理器的强大算力。在进行模型训练/推理时,GE会被自动调用而用户并不感知。GE主要由GE API和GE Core两部分组成,详细的架构图如下所示