cancel
Showing results for 
Search instead for 
Did you mean: 

Programming of ST neural-ART

brianon
Associate

Hi,

I am currently working with the nucleo-n657x0-q development board and trying to use the ST neural-ART NPU of the STM32N657X0 MCU. While I know that neural network models can be automatically mapped to the NPU through the STEdgeAI-core, I was wondering if there is any documentation on how I could manually program the NPU? Either through a library/API or through low level functions.

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @brianon,

 

Thanks for the context.

Sadly, you can only use the NPU through the compiled code of the STEdgeAI Core.

 

You can find the supported layers for the NPU here:

https://stedgeai-dc.st.com/assets/embedded-docs/stneuralart_operator_support.html

 

There are some layers mapped on the NPU (HW in the doc) that does could be used, I think, in small models with only an input, the layer, and an output that you could use as accelerated mathematical function in a way.

For example AVERAGE_POOL_2D. I think you would need to fix the input/ouput size.

 

For layers like a Conv2D, I don't think it would be useful as the filters values would be fixed.

 

We support the uses of multiple models.

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Julian E.
ST Employee

Hello @brianon,

 

As of today, there is no API/library to control what the NPU is doing.

You can play with some options or the memorypool description to try to influence how the compilator will react but that's all.

 

I don't think it is planned to release an API any time soon.

 

Could you explain why it would be useful for you to have such API? how would you use it?

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Julian E., thank you for the reply.

To give more context, I'm working on a project to accelerate a Spiking Neural Network. While I know that the ST neural-ART is aimed for CNNs, I want to explore how the arithmetic accelerators can be utilized for math related to spiking. My original idea was to create the model from the ground up for the CPU and then map some functions over to the NPU to improve performance.

Do you have any recommendation on how I should proceed then given that there are no APIs? Am I limited to only interacting with the NPU through code compiled through the STEdge core?

Hello @brianon,

 

Thanks for the context.

Sadly, you can only use the NPU through the compiled code of the STEdgeAI Core.

 

You can find the supported layers for the NPU here:

https://stedgeai-dc.st.com/assets/embedded-docs/stneuralart_operator_support.html

 

There are some layers mapped on the NPU (HW in the doc) that does could be used, I think, in small models with only an input, the layer, and an output that you could use as accelerated mathematical function in a way.

For example AVERAGE_POOL_2D. I think you would need to fix the input/ouput size.

 

For layers like a Conv2D, I don't think it would be useful as the filters values would be fixed.

 

We support the uses of multiple models.

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.