From b74492c5aee3786b886951e87f4e5ea8d6032733 Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Thu, 10 Sep 2020 13:26:01 +0200 Subject: Support inferences with multiple inputs and outputs Build flatbuffers library. Update network class to extract IFM and OFM dimensions from the tflite file. Update the uapi and core apis to support up to 16 IFM and OFM buffers per inference. Change-Id: I2f2f177aa4c2d5f9f50f23eb33c44e01ec2cbe09 --- kernel/ethosu_core_interface.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'kernel/ethosu_core_interface.h') diff --git a/kernel/ethosu_core_interface.h b/kernel/ethosu_core_interface.h index 827ce4f..0dd1996 100644 --- a/kernel/ethosu_core_interface.h +++ b/kernel/ethosu_core_interface.h @@ -27,6 +27,9 @@ #include #endif +/** Maximum number of IFM/OFM buffers per inference */ +#define ETHOSU_CORE_BUFFER_MAX 16 + /** * enum ethosu_core_msg_type - Message types * @@ -79,14 +82,17 @@ struct ethosu_core_buffer { struct ethosu_core_inference_req { uint64_t user_arg; - struct ethosu_core_buffer ifm; - struct ethosu_core_buffer ofm; + uint32_t ifm_count; + struct ethosu_core_buffer ifm[ETHOSU_CORE_BUFFER_MAX]; + uint32_t ofm_count; + struct ethosu_core_buffer ofm[ETHOSU_CORE_BUFFER_MAX]; struct ethosu_core_buffer network; }; struct ethosu_core_inference_rsp { uint64_t user_arg; - uint32_t ofm_size; + uint32_t ofm_count; + uint32_t ofm_size[ETHOSU_CORE_BUFFER_MAX]; uint32_t status; }; -- cgit v1.2.1