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: Issue with TIOVX Node in Pipeline Mode on PSDK 9.2

Part Number: TDA4VH-Q1

Tool/software:

Hi TI,

I am testing a custom application with PSDK 9.2, which worked fine in PSDK 9.0.
The application uses a TIDL node that handles 32 objects (6 for config, 1 for input tensor, and 25 for output tensors).

However, when I use pipeline mode,I encounter an issue where the next node receives an unexpected object descriptor during processing.
I found that objects beyond the 16th are treated as bidirectional due to the "TIVX_OBJ_DESC_BIDIR_FLAG (0x10000)"
and bidirectional objects do not seem to work in pipeline mode with NodeParameterNumBuf > 1.

Could you please check this issue?

Thank you.

  • Hi,

    However, when I use pipeline mode,I encounter an issue where the next node receives an unexpected object descriptor during processing.
    I found that objects beyond the 16th are treated as bidirectional due to the "TIVX_OBJ_DESC_BIDIR_FLAG (0x10000)"
    and bidirectional objects do not seem to work in pipeline mode with NodeParameterNumBuf > 1.

    In the TIDL node, I see that the input and output tensors are set as VX_INPUT and VX_OUTPUT respectively but not as VX_BIDIRECTIONAL as shown below

    May I know where and which parameter do you see as Bidirectional here?

    Regards,

    Nikhil

  • In the ownNodeSetObjDescParamDirection() function, if prm_idx 16 to 31 are set to VX_INPUT, it will be as if prm 0 to 15 were set to VX_BIDIRECTIONAL..



    void ownNodeSetObjDescParamDirection(vx_node node)
    {
        uint32_t prm_idx, prm_dir, is_prm_input;
    
        is_prm_input = 0;
    
        for(prm_idx=0; prm_idx < ownNodeGetNumParameters(node); prm_idx++)
        {
            prm_dir = (uint32_t)ownNodeGetParameterDir(node, prm_idx);
    
            if(prm_dir==(uint32_t)VX_INPUT)
            {
                tivxFlagBitSet(&is_prm_input, ((uint32_t)1U<<prm_idx));
            }
            if(prm_dir==(uint32_t)VX_BIDIRECTIONAL)
            {
                tivxFlagBitSet(&is_prm_input, ((uint32_t)TIVX_OBJ_DESC_BIDIR_FLAG << prm_idx));
            }
        }
    
        node->obj_desc[0]->is_prm_input = is_prm_input;
    }
    

  • Hi,

    if prm_idx 16 to 31 are set to VX_INPUT, it will be as if prm 0 to 15 were set to VX_BIDIRECTIONAL..

    Is this happening to the TIDL node? 

    shown below

    Could you please check if the above is modified in your code in the host implementation? All the input tensors are supposed to be VX_INPUT and all the output tensors are supposed to be VX_OUTPUT as per the above implementation.

    Regards,

    Nikhil

  • hi Nikhil

    This issue is not related to the TIDL node.
    It is a problem that arose with the addition of the VX_BIDIRECTIONAL feature in TIOVX, which is included in PSDK 9.2.
    This issue occurs with all TIOVX nodes that have more than 16 object connections.

    Simply put, when setting the is_prm_input variable in ownNodeSetObjDescParamDirection(),
    if the 16th object is an input, is_prm_input is set (0x00010000), which is the same as the value (0x00010000) when the 0th object is set to bi-directional.

  • Hi,

    Thank you for pointing this out. Typically the value of TIVX_OBJ_DESC_BIDIR_FLAG can be shifted further to avoid this. Let me check internally regarding this and get back to you.

    But can you help me understand the issue that you are facing when the input param is considered as bidirectional param? 

    I see that the tivxSetNodeParameterNumBufByIndex() sets for BIDIRECTIONAL and OUTPUT, but not for input. 

    bidirectional objects do not seem to work in pipeline mode with NodeParameterNumBuf > 1.

    Could you please elaborate on this?

    Also are you facing the issue if you change the value of TIVX_OBJ_DESC_BIDIR_FLAG to accomodate more VX_INPUT?

    Regards,

    Nikhil

  • Hi Nikhil

    Due to the previously mentioned issue, I have observed the following behavior:

    • For Node A, the 1st parameter is intended to be set as input, and the 16th parameter as output.
    • However, due to the TIVX_OBJ_DESC_BIDIR_FLAG, when the 1st parameter is set, the 16th parameter is also set as BIDIRECTIONAL.
    • During the processing of Node A, ownTargetNodeDescReleaseAllParameters() is called. This function returns input and bidirectional parameters to the data reference queue.
    • The 16th parameter, being set as bidirectional, is returned last to the data reference queue.
    • Node B uses parameters 8 through 32 from Node A as inputs.
    • When Node B attempts to read the 16th parameter from Node A, it retrieves the first element from the data reference queue. If the queue size is greater than 1, this element does not contain valid data.

    regards.

  • Hi,

    Thank you for elaborating the usecase here. 

    I have raised a jira for the same internally to analyze a fix for this issue. 

    Placing the JIRA link here for internal tracking

    jira.itg.ti.com/browse/TIOVX-1845

    Currently, it is targeted to be fixed by SDK 10.1 which will be available by end of November as per the current roadmap.

    Meanwhile, can you apply the below patch in TIOVX folder and do a clean build of the SDK?

    /cfs-file/__key/communityserver-discussions-components-files/791/Remove_5F00_bidirection_5F00_support.patch

    I have reverted the changes to introduce the bidirection support here. Please let me know if this workaround works for you.

    Regards,

    Nikhil

  • hi,

    Thank you for your support.
    After applying the patch, the application is working well.
  • Thank you for the confirmation. We shall soon get back with a fix on this patch by SDK 10.1