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.

[TDA4M] PSDKRA/TIDL - Support for ONNX Mul operator

Hello,

We are using PSDKRA 6.0.1.0 and TIDL 0.9.1.0.

During the import of an ONNX model, we observed the following message on the console:

 ONNX operator Mul is not suported now..  By passing

It appears that the 'Mul' operator is supported for TF and TFLite models, but not for ONNX.

Does TI have any plan to support this operator in future TIDL releases? If yes, tentatively by when?

Thank you.

  • Hi Sagar,

    This just needs an update in import tool. Import tool is available as source in the release package that you are using.

    You can refer TF and TF lite import to make this change.

    Is this multiplication, element-wise or channel-wise (broadcast)? Can you share the sample model suggest necessary change

  • Hello Kumar,

    The multiplication is element-wise.

    I will refer to the TF and TFLite import tools and then attempt to update the ONNX import tool.

    Thank you.

  • Add below entry in  tidl_onnxOpParamMapTable
      { "Mul",                           TIDL_onnxMapMulParams },
    And below fucntion to tidl_onnxImport.cpp file
    int32_t TIDL_onnxMapMulParams(sTIDL_OrgNetwork_t   *pOrgTIDLNetStructure,
      int32_t              i,
      int32_t              layerIndex,
      int32_t              *dataIndex,
      GraphProto&            onnGraph)
    {
      pOrgTIDLNetStructure->TIDLPCLayers[layerIndex].layerType = TIDL_EltWiseLayer;
      pOrgTIDLNetStructure->TIDLPCLayers[layerIndex].layerParams.eltWiseParams.eltWiseType = TIDL_EltWiseProduct;
      pOrgTIDLNetStructure->TIDLPCLayers[layerIndex].outData[0].dataId = (*dataIndex)++;
      pOrgTIDLNetStructure->TIDLPCLayers[layerIndex].numInBufs = onnGraph.node(i).input_size();
     
      if (pOrgTIDLNetStructure->TIDLPCLayers[layerIndex].numInBufs > 2)
      {
        printf("TIDL_EltWiseProduct is Only suported with two Inputs channels\n");
        exit(-1);
      }  
      return 0;
    }
  • Hello Kumar,

    After making the code changes, the import tool is able to process the 'Mul' operator. We are no longer seeing the error messages on the console.

    I am closing this thread. Thank you very much for your support.