mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-09-02 18:06:13 +02:00
![]() To improve performance, we have implemented zero-copy optimization for neutron NPU, and third-party inference engines such as tflite can use neutron memory directly, thus avoiding to perform memcpy between neutron ddr memory and application context as follows: - Avoid copying input data from application to neutron memory. - Avoid copying output data from neutron memory back to the application. This patch enables the memory cache and let the driver maintain the memory and cache coherency.The main changes are: - Flush the input buffer cache for device before starting inference. - Invalidate the output buffer cache for cpu after inference is complete. - Flush other constant data for device via IOCTL in preparation. Signed-off-by: Jiwei.Fu <jiwei.fu@nxp.com> Reviewed-by: Forrest Shi <xuelin.shi@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com> |
||
---|---|---|
.. | ||
uapi | ||
Kconfig | ||
Makefile | ||
neutron_buffer.c | ||
neutron_buffer.h | ||
neutron_device.c | ||
neutron_device.h | ||
neutron_driver.c | ||
neutron_inference.c | ||
neutron_inference.h | ||
neutron_mailbox.c | ||
neutron_mailbox.h |