This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Some question about Arm Embedded Evaluation Kit

Ask the Arm ML Embedded Evaluation Kit(review.mlplatform.org/.../documentation.md

1.In the "Memory considerations" section of this article, it is mentioned that there are three memory modes that can be set. May I ask why the Dedicated_Sram mode can only be used on Ethos-U65?

Is it because of some hardware limitation that it can only be used on U65?

2.Why does activate_buf_sz in use_case.cmake refer to different memory when Shared_Sram and Dedicated_Sram are used? Under Shared_Sram, it refers to the size of SRAM, and under Dedicated_Sram, it refers to the size of DRAM?

The activate buffer I know is to put the tensor arena and should be placed in the cache. Not sure why the size of this value for different modes refers to different things.

 (Dedicatd_Sram_mode) (Shared_Sram_mode)

3.I have tried putting a model (FSRCNN, github.com/.../FSRCNN_Tensorflow)
Convert it to tflite, and use the Vela compiler to convert tflite into an optimized model and put it on the FVP of Ethos-U65 to simulate, and encountered a problem.
"tensor allocation failed!"

This situation was encountered before because the value of activate_buf_sz in use_cased.cmake was set too small. At this time, we need to check the memory of the repoert of Vela comilper to adjust its size.

I am using dedicated Sram mode this time, so I have to check the DRAM used value of Memory uesd to adjust.
But this time the situation is different. The value I adjusted has exceeded the required value.

Still tensor allocation failed!
Would like to ask is there any reason why he failed?

 (vela report)

 (activate_buf_sz in use_cased.cmake)

Thanks in advance for your answers

Parents
  • 1.  Dedicated SRAM is a memory mode where tensor arena & model live in DRAM. SRAM is only used as a cache. Now, U55 is not designed to use DRAM as it's memory interface will give a lower bandwidth than a U65. So Dedicated SRAM memory mode is specific to U65

    2. activate_buf_sz represents the size of the Arena. As you rightly said which means SRAM for U55 and DRAM for U65. 

    for the dedicated SRAM mode in u65 both the model and area fall in DRAM but then there is a spilling of arena in SRAM ( arena gets cached in SRAM).

    In Eval kit it's given via  get_cache_arena_size() for a static cache_arena

    We recently merged changes https://review.mlplatform.org/c/ml/ethos-u/ml-embedded-evaluation-kit/+/7227 in which we make this configurable with  `ETHOS_U_NPU_CACHE_SIZE`that represent the arena cache from the command line and avoid to manually change the value in the eval kit. As said this parameter has effect only when building for U65.

    3. To answer this, I need to check this issue in more detail like a version of FVP, arena_cache_size given in Vela.ini, full command, and compiler used? Currently, the arena_cache_size is currently fixed as 2MB as per the default 2MB SRAM size in FVP, so you need to allocate the memory accordingly. you can reach out to us at support-ml <support-ml@arm.com> if you need any specific investigation in your use case. 

     

Reply
  • 1.  Dedicated SRAM is a memory mode where tensor arena & model live in DRAM. SRAM is only used as a cache. Now, U55 is not designed to use DRAM as it's memory interface will give a lower bandwidth than a U65. So Dedicated SRAM memory mode is specific to U65

    2. activate_buf_sz represents the size of the Arena. As you rightly said which means SRAM for U55 and DRAM for U65. 

    for the dedicated SRAM mode in u65 both the model and area fall in DRAM but then there is a spilling of arena in SRAM ( arena gets cached in SRAM).

    In Eval kit it's given via  get_cache_arena_size() for a static cache_arena

    We recently merged changes https://review.mlplatform.org/c/ml/ethos-u/ml-embedded-evaluation-kit/+/7227 in which we make this configurable with  `ETHOS_U_NPU_CACHE_SIZE`that represent the arena cache from the command line and avoid to manually change the value in the eval kit. As said this parameter has effect only when building for U65.

    3. To answer this, I need to check this issue in more detail like a version of FVP, arena_cache_size given in Vela.ini, full command, and compiler used? Currently, the arena_cache_size is currently fixed as 2MB as per the default 2MB SRAM size in FVP, so you need to allocate the memory accordingly. you can reach out to us at support-ml <support-ml@arm.com> if you need any specific investigation in your use case. 

     

Children