joint_adv.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef _AX_JOINT_ADV_H_
  2. #define _AX_JOINT_ADV_H_
  3. #include "joint.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef enum _AX_JOINT_COMPONENT_TYPE_E {
  8. AX_JOINT_COMPONENT_TYPE_UNKNOWN = 0,
  9. AX_JOINT_COMPONENT_TYPE_NEU = 1,
  10. AX_JOINT_COMPONENT_TYPE_ONNX = 2,
  11. AX_JOINT_COMPONENT_TYPE_MAGMA = 3,
  12. AX_JOINT_COMPONENT_TYPE_AXE = 4
  13. } AX_JOINT_COMPONENT_TYPE_T;
  14. typedef struct _AX_JOINT_COMPONENT_PROFILE_T {
  15. AX_U32 nTotalUs;
  16. AX_U32 nCoreUs; // XXX e.g. for neu, this records interpreter's consumption
  17. AX_U32 nInitUs;
  18. AX_U64 u64Reserved[6];
  19. } AX_JOINT_COMPONENT_PROFILE_T;
  20. typedef struct _ax630a_joint_component {
  21. AX_JOINT_COMPONENT_TYPE_T eType;
  22. const AX_CHAR *pName;
  23. AX_JOINT_COMPONENT_PROFILE_T tProfile;
  24. AX_NPU_SDK_EX_MODEL_TYPE_T eVNPUMode;
  25. #if defined(__aarch64__)
  26. AX_U64 u64Reserved[5];
  27. #elif defined(__arm__)
  28. AX_U64 u64Reserved[6];
  29. #endif
  30. } AX_JOINT_COMPONENT_T;
  31. /*! experimental
  32. * \param components: output parameter, as list of component, whose memory is
  33. * owned by `context` \param size: size of `*components`
  34. */
  35. AX_S32 AX_JOINT_ADV_GetComponents(AX_JOINT_EXECUTION_CONTEXT context,
  36. AX_JOINT_COMPONENT_T **pComponents,
  37. AX_U32 *nSize);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif