Skip to main content
Associate
June 12, 2026
Question

Peak RAM and Peak Flash measurement for AI model

  • June 12, 2026
  • 3 replies
  • 58 views

Hi team, 

Reposting my earlier query as it appears to have been missed.

How do I measure the peak RAM and peak Flash usage of an AI model?

I need to calculate peak RAM and peak Flash from the IDE, but the model generated by ST Edge AI is in HEX format and is not included in the IDE's reported size. So, I'm adding the HEX file size to the IDE's peak RAM and peak Flash figures — is this approach correct? Details are shared below.

 

KWS cpu+npu

IDE

 

 

Flash = text + data = 205,404 + 1,616 = 207,020 bytes ≈ 202.17 KB

RAM  = data + bss = 1,616 + 102,040 = 103,656 bytes ≈ 101.23 KB

For cpu+npu we flash the model in  hex format, so we need to add the peak ram and peak flash of hex file with IDE peak ram and peak flash.

 model size -

 

Total Peak Ram and Peak Flash

  • Peak RAM = (103,656 + 22,065 =  122.77 KB)
  • Peak Flash = (207,020 + 22,065 =  223.72 KB)

3 replies

Julian E.
ST Technical Moderator
June 24, 2026

Hi ​@visakh,

 

This is correct.

 

For information, you have all of this directly in the generate report. for example:

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.
visakhAuthor
Associate
June 26, 2026

Hi ​@Julian E. 

Thanks For the reply,

I have one more query ,For some models the ram and rom is significantly larger in project vs the model requires

Is it driver or library?
 

RAM / ROM = Model Size + Drivers & Libraries + Application Code- is this correct??

 

 

visakhAuthor
Associate
June 30, 2026

Hi ​@Julian E. 

For some models the ram and rom is significantly larger in project vs the model requires

Is it driver or library?
 

RAM / ROM = Model Size + Drivers & Libraries + Application Code- is this correct??

When you measure the model parameters from ST EdgeAI vs Peak RAM on STM IDE , the difference is high, is that attributed to the model inference library + the ST's NPU driver?