I have a question about how to make Ethos-U NPU work on a ARM Cortex-A + Cortex-M processor. First, I found ethos-u-linux-driver-stack and ethos-u-core-software on https://git.mlplatform.org/.
1. I know ethos-u-linux-driver-stack is Ethos-U kernel driver. Should it be integrated into the Linux OS running on Cortex-A or be integrated into the Linux OS running on Cortex-M? I am nor clear about which core it need to perform on.
2. For ethos-u-core-software, how to run it? I did't find the detail steps to run it. Does it run on NPU or any core?
3. Except the above two repos, is there any other repo necessory to make Ethos-U NPU work on an ARM Cortex-A + Cortex-M processor?
Thanks for your suggestion in advance.
Hi, Kristofer, I have a question about ethosu_invoke() in core driver. In this function, data_ptr->driver_action_command will be checked. I suspect it is COMMAND_STREAM, and handle_command_stream() will be called. But it is actually OPTIMIZER_CONFIG when running on the board. I have no idea about this result. Could you help to give me some guide? Thanks.
Hi, Kristofer, could you help to reply my question?
Sorry for the late reply. I have been on Christmas holiday for the last two weeks and this is my first day after the holiday.
The function ethosu_invoke() takes a pointer to struct custom_data_s , which is a dynamic array of driver actions. Vela will typically place an optimizer config followed by a command stream.
 https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/tree/src/ethosu_driver.c#n71 https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/tree/src/ethosu_driver.c#n363
Hi, Kristofer, it doesn't matter. Happy New Year! :) Thank you very much for your detailed explanation. According to the explanation, the loop  will first run case OPTIMIZER_CONFIG and verify that the command stream has been generated for the correct NPU, then data_ptr will point to the actual command stream. The loop  will run case COMMAND_STREAM and handle_command_stream. Is it right?
That is correct.
Happy New Year!
View all questions in Machine Learning forum