aboutsummaryrefslogtreecommitdiff
path: root/kernel/uapi/ethosu.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/uapi/ethosu.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/uapi/ethosu.h')
-rw-r--r--kernel/uapi/ethosu.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/uapi/ethosu.h b/kernel/uapi/ethosu.h
index 4627cb9..033afe6 100644
--- a/kernel/uapi/ethosu.h
+++ b/kernel/uapi/ethosu.h
@@ -59,6 +59,8 @@ namespace EthosU {
struct ethosu_uapi_inference_create)
#define ETHOSU_IOCTL_INFERENCE_STATUS ETHOSU_IOR(0x31, \
struct ethosu_uapi_result_status)
+#define ETHOSU_IOCTL_INFERENCE_CANCEL ETHOSU_IOR(0x32, \
+ struct ethosu_uapi_cancel_inference_status)
/* Maximum number of IFM/OFM file descriptors per network */
#define ETHOSU_FD_MAX 16
@@ -78,6 +80,8 @@ enum ethosu_uapi_status {
ETHOSU_UAPI_STATUS_ERROR,
ETHOSU_UAPI_STATUS_RUNNING,
ETHOSU_UAPI_STATUS_REJECTED,
+ ETHOSU_UAPI_STATUS_ABORTED,
+ ETHOSU_UAPI_STATUS_ABORTING,
};
/**
@@ -238,6 +242,14 @@ struct ethosu_uapi_result_status {
struct ethosu_uapi_pmu_counts pmu_count;
};
+/**
+ * struct ethosu_uapi_cancel_status - Status of inference cancellation.
+ * @status OK if inference cancellation was performed, ERROR otherwise.
+ */
+struct ethosu_uapi_cancel_inference_status {
+ enum ethosu_uapi_status status;
+};
+
#ifdef __cplusplus
} /* namespace EthosU */
#endif