aboutsummaryrefslogtreecommitdiff
path: root/src/ethosu_device.h
AgeCommit message (Collapse)Author
8 daysRemove malloc call from device init codeHEADmainJonny Svärd
As there is max one device per driver handle, store the device struct in the driver struct and get rid of the malloc call from the device init code. Change-Id: I0f98a78907cb322d98278e9adc314e3c05f54308 Signed-off-by: Jonny Svärd <jonny.svaerd@arm.com>
2024-05-07Add initial support for Ethos-U8524.05-rc224.05-rc124.05Jonny Svärd
Change-Id: I28d7cb72c149a636a4f1d8ca6931316486b1829a Signed-off-by: Jonny Svärd <jonny.svaerd@arm.com>
2023-02-16Fix (part of) SEI CERT coding standard warning23.02-rc223.02Ledion Daja
Change-Id: Ic370f071eb4f3ed83cd9e5a6b587d7d527c37825
2022-03-31Add driver async APIJonny Svärd
Add an asynchronous API to the driver. The current synchronous API is now using the new async API internally. The main new functions are ethosu_invoke_async() and ethosu_wait(). Every successfull call to ethosu_invoke_async() must be followed by a call to ethosu_wait() to get the status of the inference. The wait function can be called in a blocking or non-blocking mode by specifying the `block` argument to true/false. The regular synchronous invoke function is implemented as a invoke_async followed by a wait(block=true) call. Short sommary of changes: - Add an internal ethosu_job struct to keep track of inference data and job state. - Use async API in blocking mode for normal flow - Change default semaphore implementation to binary type - Move error prints out of interrupt context - Move ethosu_inference_begin() callback to right before HW invoke - Always call ethosu_inference_end() callback, even in case of errors - On NPU error, do not keep NPU powered after being reset Change-Id: If4c3c46e3c6732a669e17251bd848dea5765a490
2021-12-22Add func to get nbr of PMU event countersJonny Svärd
Small bugfix to a print in driver Change-Id: I277a441a9f65c647c338b92af5a908176929102c
2021-11-01Autumn clean/refactor of NPU driverJonny Svärd
A continuation of the spring clean/refactor work. Create a better separation between driver and device(s). A short summary of what this commit contains: - Split device and driver - Simplify and hide the internal device interface - Remove (broken) abort inference functionality - Refactoring of structure - Optimizations and bugfixes Change-Id: I8988bc5f163f9ea62add2a933e4f100a82cc8d35