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.

TDA4VH-Q1: MMALIB: FullyconnectedBias layer - Test case parameters

Part Number: TDA4VH-Q1

Tool/software:

Hi. I had some problem with the test case prms,

//  static MMALIB_CNN_fullyConnectedBias_ixX_ixX_oxX_testParams_t testParams[] =
//    {
//       STATIC,                                           // test pattern
//       staticRefInputX_test3000,                         // Input feature map
//       MMALIB_INT8,                                      // datatypeX
//       staticRefInputH_test3000,                         // Pre-processed filter
//       MMALIB_INT8,                                      // datatypeH
//       staticRefInputBias_test3000,                      // Bias vector
//       MMALIB_INT32,                                     // datatype for bias
//       staticRefInputScale_test3000,                     // Scale vector/scalar
//       MMALIB_INT8,                                      // datatype scale
//       staticRefInputShift_test3000,                     // Shift vector/scalar
//       staticRefOutput_test3000,                         // output feature map reference
//       MMALIB_INT8,                                      // output datatype
//       NULL,                                             // DynamicRangeMin
//       NULL,                                             // DynamicRangeMax
//       64,                                               // height of feature map
//       1280,                                             // width of feature map
//       1600,                                             // stride of feature map
//       1280,                                             // height of kernel matrix
//       128,                                              // width of kernel matrix
//       81920,                                            // stride of kernel matrix
//       64,                                               // height of output matrix
//       128,                                              // width of output matrix
//       128,                                              // stride of output matrix
//       MMALIB_SATURATION,                                // activation type
//       0,                                                // parameterized saturation min
//       0,                                                // parameterized saturation max
//       MMALIB_SUCCESS,                                   // expectedStatus;
//       MMALIB_DYNAMIC_RANGE_DISABLE,                     // enableDynamicRange
//       MMALIB_DYNAMIC_RANGE_NOINIT,                      // initDynamicRange
//       MMALIB_QUANT_PER_KERNEL,                          // quantization method
//       MMALIB_TEST_OUTPUT_MSMC,                          // output data location
//       1,                                                // num. of repetitions
//       0,                                                // pre-process flag for kernel matrix
//       3000,                                             // test ID
//    };
About the test, i dont under stand about the stride of feature input matrix and stride of output matrix. Like the figure in MMALIB guideline of FC-layer, i could understand the stride of that weight matrix after pre-processing. But about the X^T and Y^T matrix (in and output matrices): it so ambiguous. So can you guys explain the single params above in details for me?
Tks,
  • Hello,

    May I ask the goal/purpose of this investigation?  MMALIB kernel/function calls outside the context of TIDL are not supported (i.e. we do not support customers directly calling MMALIB for AI).  The performance of the fullyConnected operation depends strongly on the memory management of the inputs/outputs and this is handled by TIDL.  Thus, accessing computation for fullyConnected is done through TIDL.

    Best,

    Will

  • my aim is to improve the layer itself. So i just want to deep dive into how MMALIB handle these params and how's the input and weight was aligned and put into system memory. 
    - Another question is: about the TIDL can you gimme some guideline that from 1 model we can convert and detect which layer was run on the A72 and which was run on C7x?
    Tks,

  • Hi Will,
    About the question: i just want to know, from the artifacts in TIDL, can i extract the params that passing into each layer?(Like the test case in FC-bias layer)?
    Or is there any tool that parse the output from my trained models to know every single parameters?

  • Hi Khoi,

    If the question is specific to the parameters being passed from TIDL to MMALIB, then, no there is not a tool or method for detecting this information.  If the question is different, please post a new e2e with that specific question as well so that it can be directed to the appropriate person.

    Best,

    Will

  • okay, 
    Tks for your help, Will.