linux-imx/drivers/staging/neutron
Jiwei.Fu 91817fe5b6 AIR-11882: neutron: Enable neutron memory cache to improve npu benchmark performance
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>
2024-11-19 16:15:19 +08:00
..
uapi AIR-11882: neutron: Enable neutron memory cache to improve npu benchmark performance 2024-11-19 16:15:19 +08:00
Kconfig
Makefile LF-10551-5: drivers: neutron: add inference driver support 2023-12-04 14:41:55 +08:00
neutron_buffer.c LF-13686: neutron: support firmware loading at runtime 2024-10-21 11:42:19 +08:00
neutron_buffer.h LF-13686: neutron: support firmware loading at runtime 2024-10-21 11:42:19 +08:00
neutron_device.c AIR-11882: neutron: Enable neutron memory cache to improve npu benchmark performance 2024-11-19 16:15:19 +08:00
neutron_device.h LF-13686: neutron: support firmware loading at runtime 2024-10-21 11:42:19 +08:00
neutron_driver.c AIR-11581 driver: neutron: Enable runtime power-management autosuspend 2024-07-18 14:18:34 +08:00
neutron_inference.c AIR-11882: neutron: Enable neutron memory cache to improve npu benchmark performance 2024-11-19 16:15:19 +08:00
neutron_inference.h LF-13686: neutron: support firmware loading at runtime 2024-10-21 11:42:19 +08:00
neutron_mailbox.c LF-10551-4: drivers: neutron: add mailbox support 2023-12-04 14:41:54 +08:00
neutron_mailbox.h LF-10551-4: drivers: neutron: add mailbox support 2023-12-04 14:41:54 +08:00