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.

[TDA4] : Facing Issue while creating graph with custom kernel

Hi SIr/Madam,

I am working with psdk_rtos_auto_j7_06_01_00_15 fro TDA4x

I am trying to create a graph by including a custom kernel created by me. The code get built successfully.

But I get the following errors when i run the code

0.1041s: VX_ZONE_ERROR:[vxGetStatus:603] vxGetStatus: Reference is NULL
0.1069s: VX_ZONE_ERROR:[vxReleaseKernel:43] vxReleaseKernel: Invalid kernel reference
0.1073s: VX_ZONE_ERROR:[vxSetReferenceName:558] vxSetReferenceName: Invalid reference
0.7761s: VX_ZONE_ERROR:[tivxObjectDeInit:168] tivxObjectDeInit: Is graph use failed
0.7822s: VX_ZONE_ERROR:[tivxObjectDeInit:180] tivxObjectDeInit: Is kernel use failed
0.7832s: VX_ZONE_ERROR:[tivxObjectDeInit:228] tivxObjectDeInit: Is image use failed
0.7838s: VX_ZONE_ERROR:[tivxObjectDeInit:276] tivxObjectDeInit: Is error use failed

These errors are due to the node for the new kernel not being created properly.

I have got these errors from the following function :

usecase->node_1 = usecase_node_create_node_1 (
graph ,
usecase->in1 ,
usecase->in2
)

If i create a graph with existing kernel, then the graph runs perfectly fine.

When i follow the same steps of graph and custom kernel creation on my colleague laptop, I do not get these errors and the graph runs perfectly fine.

I tried by reinstalling the PSDK packages but faced the same issue. 

Kindly suggest me what could be the possible reason and solution.

Regards,

Jyoti Patil

  • Hi Jyoti,

    In order to create a node out of a kernel, the module that the kernel is contained in must be registered with the framework.  In order to do so, the kernel module must have a registration function that is called on both the host and target core side.  These registration functions register the callbacks for the host and target side with the framework.

    The host side registration is called at init time in the application.  You can reference the tivxSrvLoadKernels for an example of loading the host side kernel callbacks.  The target side registration is called at init time of the core in which the kernel should run on.  You can reference where the tivxRegisterSrvTargetC66Kernels is called in vision_apps/apps/basic_demos/app_tirtos/common/app_init.c.

    Please let me know if equivalent calls are made in your application.

    Regards,

    Lucas

  • Hi Lucas,

    I have done both the steps you have mentioned.

    I have made the registration calls in the function tiovx/source/platform/PC/common/tiovx_init.c for PC .

    I have the load related call in my generated graph .c file.

    I have also included the kernel lib's in my applications's make file.

    The issue i am facing is only on my system. I have reinstalled the PSDK package n tried and still facing the issue. 

    Regards,

    Jyoti Patil

  • Hello Jyoti,

    Could you please add print statements to the kernel module load function for both the host and target side in addition to the kernel-specific functions that register the host and target callbacks?  After doing so, could you please send me the full logs?

    It is possible that the kernel limit has been exceeded and therefore is causing it to not be able to be registered.  If this is the case, we can increase the value for max kernels in the tiovx/include/TI/tivx_config.h file.

    Regards,

    Lucas

  • I haven't heard back from you, I'm assuming you were able to resolve your issue.

    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,

    Lucas

  • Hi Lucas,

    The issue is resolved.

    I had given incorrect custom kernel name in the graph creation python script.

    Thanks for the support.

    Regards,

    Jyoti Patil