Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

When and how is vxPublishKernels() necessary?

RSun9
New Contributor I
1,046 Views

Hi there,

In two CV SDK samples, i.e. the face detection user nodes and video stabilization user nodes, the API function vxPublishKernels() is defined. Within that function, the user kernels are registered to the context via vxAddUserKernelvxAddParameterToKernel, and vxFinalizeKernel.

However, the main application in neither of the two samples explicitly calls vxPublishKernels() , meaning the user kernels are not registered before they are used. Yet the samples work fine.

I  experimented with my own user kernel/node too. My user kernel defines the API function vxPublishKernels(), very similar to the ones in the aforementioned samples. This is what I am observing: as long as I can correctly load the library that is built with my user kernel, via vxLoadKernels(context, my_user_kernel_lib), my code runs correctly regardless of whether vxPublishKernels() is called or not.

How is this so? Why does vxPublishKernels() seem unnecessary? When should it be used?

Thanks!

-Robby

0 Kudos
1 Solution
RSun9
New Contributor I
1,046 Views

Hi Stav,

Sorry for the late response. I was on vacation for a week.

This is what I understand now: The purpose of vxPublishKernels  is for the OpenVX framework to add a user's custom kernels at run-time. The function is not called by the user, but by the framework.

Thanks,

Robby

View solution in original post

0 Kudos
4 Replies
Stav_S_Intel
Employee
1,046 Views

Hi Robby, 

vxPublishKernels is used to allow users to add custom kernels to the known database in OpenVX at run-time. 

Hence, the reason you  do not see a direct call for it.

 

Regards,

Stav

0 Kudos
RSun9
New Contributor I
1,047 Views

Hi Stav,

Sorry for the late response. I was on vacation for a week.

This is what I understand now: The purpose of vxPublishKernels  is for the OpenVX framework to add a user's custom kernels at run-time. The function is not called by the user, but by the framework.

Thanks,

Robby

0 Kudos
Stav_S_Intel
Employee
1,046 Views

Hi Robby,

that is correct.

Hope you had a good vacation.

Regards,

Stav

0 Kudos
RSun9
New Contributor I
1,046 Views

Hi Stav, Thanks for the confirmation. And yes, I had a wonderful vacation ;-)

-Robby

0 Kudos
Reply