From 7e8f508765632c42cc44fd8ad704c9d90943ab32 Mon Sep 17 00:00:00 2001 From: Davide Grohmann Date: Wed, 23 Mar 2022 12:48:45 +0100 Subject: 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 --- kernel/ethosu_mailbox.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kernel/ethosu_mailbox.h') diff --git a/kernel/ethosu_mailbox.h b/kernel/ethosu_mailbox.h index 55d4436..7af0c47 100644 --- a/kernel/ethosu_mailbox.h +++ b/kernel/ethosu_mailbox.h @@ -203,4 +203,13 @@ int ethosu_mailbox_network_info_request(struct ethosu_mailbox *mbox, struct ethosu_buffer *network, uint32_t network_index); +/** + * ethosu_mailbox_cancel_inference() - Send inference cancellation + * + * Return: 0 on success, else error code. + */ +int ethosu_mailbox_cancel_inference(struct ethosu_mailbox *mbox, + void *user_arg, + void *inference_handle); + #endif /* ETHOSU_MAILBOX_H */ -- cgit v1.2.1