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.

PROCESSOR-SDK-TDAX: Developing custom application in PSDK using VISION APPS and PyTIOVX

Part Number: PROCESSOR-SDK-TDAX

Hello Everyone,

I am developing a custom application using TI's VISION APPS and PyTIOVX tool.

My application is divided into different modules-(say 6 nodes/kernels)

I have generated custom kernel for each of my modules and is successful and I have even built and compiled my application code (CPP code) to add as a static library.

I have also created an application graph for my usecase.

But, now I am facing many issues when passing input to application graph and printing output from my application graph.

I have the following queries.

1) As of now, i am individually generating kernels and static library for each node. I need some clarity on how to integrate them. Should I work with application graph on getting output from node 1 to pass it to node 2 and so on till node 6? Or is there any other way out to pass directly from one node to the other? (Because it is difficult to get output from each node and pass it to the other as each node outputs data of different format).

I have just created a sample with two_nodes (addition & multiplication) and attached the same. Please verify the attachment as I am able to get output from node 1 but not node 2.

/cfs-file/__key/communityserver-discussions-components-files/791/7558.test.zip

2) Please suggest me a data object to pass input of the form

ut_Vec3F32 input[3]={{0.228500 ,0.374200 ,0.000000} ,{0.112500 ,0.387800 ,0.000000} ,{0.041200 ,0.363200 ,0.000000} };

where,

typedef struct

{ float data[3];

}ut_Vec3F32;

Any insight on this would really be helpful.

Thanks & Regards,

Padmasree N.

  • Hello,

    Please reply to the above query and also do throw some light on implementation of User Data Object using PyTIOVX tool.

    I have already referred the documentation but it does not give me a clear explanation on how to modify the PyTIOVX tool generated files for User data object.

    Regards,

    Padmasree N.

  • Hello,

    Any updates on the thread?

    Hoping for a sooner reply Slight smile

    Regards,

    Padmasree N.

  • Hello Padmasree,

    Answers and a couple follow up questions to your questions below:

    1. Regarding passing data to each node, in OpenVX, the communication between nodes is through the use of data objects.  Therefore, if two nodes require communication between them, then they will require to have the same data object as the interface between the nodes.  The application is responsible for invoking these nodes and establishing the connections between the nodes.  I'm not sure if this answers your question, but feel free to clarify if not.

    Regarding your sample code, are you saying that you cannot pass the vx_scalar output from tivxAdditionNode to the tivxMultiplicationNode? Since these share a vx_scalar data object at the node interface, you should be able to.  Let me know if you are having issues with this.

    2. Regarding the data object to use, I would recommend using a user data object.  User data objects allow you to define a custom OpenVX data object.  In your case, this will allow the ut_Vec3F32 to be used as an OpenVX data object.  You can create this in PyTIOVX using the below command:

    kernel.setParameter(Type.USER_DATA_OBJECT, <direction>, <paramstate>,  <name>, ['ut_Vec3F32'])

    After generating the code, you will then need to define the ut_Vec3F32 in the kernel top level header file.

    Regards,

    Lucas

  • Hello Lucas,

    Thanks for your reply!

    I am able to get output from node 1 but not node 2.in the mentioned attachment.

    Kindly please verify the same from your side.

    Regarding User data objects, I have followed the same and it is working fine now.

    Thank you!

    Please have a look at my attachment and suggest me where I am going wrong!

    Regards,

    Padmasree N.

  • Hello Padmasree,

    Sorry, I don't follow the below statement.  Is the output incorrect?  Are you not getting any output at all?  Are there any errors thrown?  Could you please provide more information about what is occurring?

    "I am able to get output from node 1 but not node 2.in the mentioned attachment."

    Regards,

    Lucas

  • Hello Lucas,

    I have created a sample of two nodes.The usecase python file is created in such a way that output of first node goes as an input to the second node.

    I am able to print the output of node 1 in the graph.But, the output of node 1 is not passed to node 2 as I am getting 0.000 from my node 2.

    When I separately pass input to node 2,it gives me correct output. But, node 1 output DOES NOT go as an input to node 2.

    Please verify the implementation.

    Regards,

    Padmasree N.

  • Hello Padmasree,

    Inside node 2 there are a few issues:

    First, the call to getprod is using input1_target_ptr which has not been set.  Instead this can use input1_desc->data.f32.  The call to this function should be the below:

    getprod(&input1_desc->data.f32, 3, &tmp);

    Second, inside the getprod function, it is printing the value of "data" but this value is never set.  Therefore, it will still be zero.  However, you can set data to the value above inside the getprod as below:

    data = *arr;

    With these changes, I am seeing the correct input of "6" inside the node and "18" as the output.

    Regards,

    Lucas

  • Hello Lucas,

    Sorry for the delay!

    Thanks for your reply!

    I am able to get the correct output after following the changes mentioned by you.

    However, I have few queries.

    1) Please explain me about input_target_ptr and input_desc parameters.

    2) Below is the block diagram for my application.I have divided into 4 nodes.

    For image reading and passing, should i create a separate node?

    I am confused. Please provide some clarity on the same.

    Regards,

    Padmasree N.

  • Hello Padmasree,

    Could you please make the new question as a new post on E2E since the initial issue has now been closed out?

    Regards,

    Lucas