This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: How to perform scaling in TIDL_Dataflow API?

Part Number: TDA4VM

The TIDL_bufParams3D_t structure has two fields for scaling/quantisation - tensorScaleList and tensorZeroPointList.  The example custom layer (Max Pooling) doesn't use these fields (presumably as its input scale and output scale are always the same).

1) When I dereference the pointers in these fields (either in srcAddr or dstAaddr) in either my TIDL DataFlow Init function or my TIDL DataFlow Exec function, the C7 just crashes.  Inspecting the values, they don't look like sensible pointer values (e.g. 0xffefffffffffffff - this would be misaligned for a float pointer).  How do I access the values?

2) How do I know how long these arrays are?  The comment implies it's either one per channel or one per tensor, but there isn't a length anywhere to tell which?

3) What's the right way to apply output scaling in the TIDL DataFlow Exec function?  My ref function uses TIDL_roundSat - should the same be done in Dataflow?  But if so, where do I get access to the outRoundBits value, which normally comes from sTIDL_Layer_t->outData.roundBits, but the layer pointer isn't available to the DataFlow Init or Exec functions? I could extend my custom parameters struct to copy round bits via kernelInitArgs, but that feels like I'm bypassing something that should already be available?

Thanks,

Ross