aboutsummaryrefslogtreecommitdiff
path: root/kernel/ethosu_core_interface.h
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2020-09-10 13:26:01 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2020-09-17 13:23:27 +0200
commitb74492c5aee3786b886951e87f4e5ea8d6032733 (patch)
tree76ef44dfdb68d68964877b0adba21cbce2416fe5 /kernel/ethosu_core_interface.h
parent116a635581f292cb4882ea1a086f842904f85c3c (diff)
downloadethos-u-linux-driver-stack-b74492c5aee3786b886951e87f4e5ea8d6032733.tar.gz
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
Diffstat (limited to 'kernel/ethosu_core_interface.h')
-rw-r--r--kernel/ethosu_core_interface.h12
1 files changed, 9 insertions, 3 deletions
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 <stdint.h>
#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;
};