aboutsummaryrefslogtreecommitdiff
path: root/kernel/ethosu_core_interface.h
diff options
context:
space:
mode:
authorDavide Grohmann <davide.grohmann@arm.com>2022-03-23 12:48:45 +0100
committerDavide Grohmann <davide.grohmann@arm.com>2022-05-05 11:13:04 +0200
commit7e8f508765632c42cc44fd8ad704c9d90943ab32 (patch)
tree42dcfb929accf5470d6aa61810da20356c39eb75 /kernel/ethosu_core_interface.h
parent82d225899bd3d4fd07d70cac80f50c1b288dc4a3 (diff)
downloadethos-u-linux-driver-stack-7e8f508765632c42cc44fd8ad704c9d90943ab32.tar.gz
Add support for inference cancellation
Send cancel inference messages to the ethosu subsystem to abort inference execution there. Also mark inference as aborted in the linux driver stack itself, so pending inference messages are not resent when resetting the firmware. Change-Id: I244c2b119fd7995d14e3859815abf2a00c7f0583
Diffstat (limited to 'kernel/ethosu_core_interface.h')
-rw-r--r--kernel/ethosu_core_interface.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/ethosu_core_interface.h b/kernel/ethosu_core_interface.h
index 76fe35e..057e3c2 100644
--- a/kernel/ethosu_core_interface.h
+++ b/kernel/ethosu_core_interface.h
@@ -59,6 +59,8 @@ enum ethosu_core_msg_type {
ETHOSU_CORE_MSG_CAPABILITIES_RSP,
ETHOSU_CORE_MSG_NETWORK_INFO_REQ,
ETHOSU_CORE_MSG_NETWORK_INFO_RSP,
+ ETHOSU_CORE_MSG_CANCEL_INFERENCE_REQ,
+ ETHOSU_CORE_MSG_CANCEL_INFERENCE_RSP,
ETHOSU_CORE_MSG_MAX
};
@@ -98,6 +100,8 @@ enum ethosu_core_status {
ETHOSU_CORE_STATUS_ERROR,
ETHOSU_CORE_STATUS_RUNNING,
ETHOSU_CORE_STATUS_REJECTED,
+ ETHOSU_CORE_STATUS_ABORTED,
+ ETHOSU_CORE_STATUS_ABORTING,
};
/**
@@ -217,6 +221,22 @@ struct ethosu_core_msg_capabilities_rsp {
};
/**
+ * struct ethosu_core_cancel_inference_req - Message cancel inference request
+ */
+struct ethosu_core_cancel_inference_req {
+ uint64_t user_arg;
+ uint64_t inference_handle;
+};
+
+/**
+ * struct ethosu_core_cancel_inference_rsp - Message cancel inference response
+ */
+struct ethosu_core_cancel_inference_rsp {
+ uint64_t user_arg;
+ uint32_t status;
+};
+
+/**
* enum ethosu_core_msg_err_type - Error types
*/
enum ethosu_core_msg_err_type {