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: The graph does not update output when multiple graph running in different threads

Part Number: TDA4VM

Hello, I'm working on TDA4VM and my graph flow is shown below.

The input graph and model1 graph run in the main thread, and the model2 graph runs in thread 1.

All nodes are replicated except the capture node.

I meet the following problems in my testing:

1. If input graph and model 1 graph are combined into one graph which graph run normally, but the dequeue data of node3  in model 2 graph is always the same.

2.When the pipeline depth and buffer depth of input graph and model 1 graph are set to 4, but the pipeline depth and buffer depth of model 2graph are set to 1, Which buffer of the input graph does the model2 graph use?

Thanks.

  • Hi,

    I have assigned this thread to correct expert.

    Please expect response from him/her.

  • Hi,

    1. If input graph and model 1 graph are combined into one graph which graph run normally, but the dequeue data of node3  in model 2 graph is always the same.

    If output of capture node is going to both the graphs, then I would suggest keeping capture node as a separate graph and then feed this buffer to both the graphs.

    .When the pipeline depth and buffer depth of input graph and model 1 graph are set to 4, but the pipeline depth and buffer depth of model 2graph are set to 1, Which buffer of the input graph does the model2 graph use?

    Pipeline depth is for the graph. So if you set pipeline depth as 1 for model2 graph, it would take the same

    Buffer depth is for the node. Here, in the graph parameter list, you should ensure that the ref list for capture node output, node 1 input and node 3 input are the same. If this is the case, then the buffer depth for all the 3 will be the same.

    Regards,

    Nikhil

  • If output of capture node is going to both the graphs, then I would suggest keeping capture node as a separate graph and then feed this buffer to both the graphs

    Can you explain the reason in detail?

    it would take the same

    Don't quite understand.

    Buffer depth is for the node. Here, in the graph parameter list, you should ensure that the ref list for capture node output, node 1 input and node 3 input are the same. If this is the case, then the buffer depth for all the 3 will be the same.

    I need to make sure three image(capture node、node 1 input and node 3 input) are consistent,but model2 graph is not in the same thread as other graphs and runs at different speeds. In this case, if the buffer depth is 1 and model1 consumes this frame first, will model2 lose data of capture image?

    The output of node2 as a graph parameter for model1 graph and buffer depth is 4, is the buffer depth of node1 output the default value of 1? If model1 graph pipeline depth is also 4, will each graph instance use the same buffer of node 1?

    Thanks.

  • Hi,

    If output of capture node is going to both the graphs, then I would suggest keeping capture node as a separate graph and then feed this buffer to both the graphs

    Can you explain the reason in detail?

    Here your capture node output would be a graph parameter as you would have to dequeue and enqueue to the other graph. 

    Hence, now since the application takes care of enqueue and dequeue, it is better to keep the receiver nodes in separate graph so that whenever there is buffer available, the nodes could use it (based on the buffer depth) and does not interfere with each other.

    Don't quite understand.

    Pipeline depth is specific to a graph, so if you set the model 2 graph with pipeline depth as 2 then it will of pipeline depth 2

    I need to make sure three image(capture node、node 1 input and node 3 input) are consistent,but model2 graph is not in the same thread as other graphs and runs at different speeds. In this case, if the buffer depth is 1 and model1 consumes this frame first, will model2 lose data of capture image?

    The output of node2 as a graph parameter for model1 graph and buffer depth is 4, is the buffer depth of node1 output the default value of 1? If model1 graph pipeline depth is also 4, will each graph instance use the same buffer of node 1?

    In order to make the flow consistent, you could do the below.

    in the graph parameter list, you should ensure that the ref list for capture node output, node 1 input and node 3 input are the same.

    Then, in your application, you dequeue from capture node and enqueue to node 1 and node 3. In this case, your flow will be consistent

    Regards,

    Nikhil

  • The output of node2 as a graph parameter for model1 graph and buffer depth is 4, is the buffer depth of node1 output the default value of 1? If model1 graph pipeline depth is also 4, will each graph instance use the same buffer of node 1?

    Thank you for your reply.

    please help to answer this question

  • Hi

    The output of node2 as a graph parameter for model1 graph and buffer depth is 4, is the buffer depth of node1 output the default value of 1?

    Yes, node 1 will have buffer depth as 1 unless you set it another value.

    If model1 graph pipeline depth is also 4, will each graph instance use the same buffer of node 1?

    Yes, But since in each graph instance, as the node runs on the same target, they would run one after the other. And if there is node 2 is accessing this buffer, then this would block node 1. Hence we suggest to have a buffer depth more than 1 in such cases.

    Regards,

    Nikhil