Hi guys,
Iam working with Openvx,Visionworks on JetsonTX1.
As you already known, Openvx speeds up computer vision application by graph scheduling, memory management,… But its own functions run on CPU only.
And in visionworks extension, I see they customized openvx functions with CUDA to run on GPU, but not all.
I wonder that, assume I set target node to run on GPU for openvx functions that implemented to run on CPU (haven’t customized by nvidia yet). So what happend?
Looking forwards to hearing from all u guys. !
Thanks.
Regards,
Trung.
Hi,
Could you share more information about your use case?
To switch implementation between heterogeneous process will leads to memory copy.
Improvement of performance with GPU depends on the complexity of tasks.
Thanks.
Hi AastaLLL;
Thanks for your response.
In visionworks, when do I know that the implement or available api run on CPU or GPU?
Because I see some functions take input as vx_image and it still run on GPU?
Thanks !
Regards,
Trung.
Hi,
By default, target is set to GPU.
If you want to switch to CPU implementation, you can manually set it to CPU:
vxSetNodeTarget(node, NVX_TARGET_CPU, NULL)
Relevant information from VisionWorks document for your reference:
----------------------------------------------------------------------------------
Targets
A ‘Target’ specifies a physical or logical devices where a node or an immediate mode function is executed. This allows the use of different implementations of vision functions on different targets. The existence of allowed Targets is exposed to the applications by the use of defined APIs. The choice of a Target allows for different levels of control on where the nodes can be executed. An OpenVX implementation must support at least one target. Additional supported targets are specified using the appropriate enumerations. See vxSetNodeTarget, vxSetImmediateModeTarget, and vx_target_e. An OpenVX implementation must support at least one target VX_TARGET_ANY as well as VX_TARGET_STRING enumerates. An OpenVX implementation may also support more than these two to indicate the use of specific devices. For example, an implementation may add VX_TARGET_CPU and VX_TARGET_GPU enumerates to indicate the support of two possible targets to assign a nodes to (or to excute an immediate mode function). Another way an implementation can indicate the existence of multiple targets, for example CPU and GPU, is by specifying the target as VX_TARGET_STRING and using strings ‘CPU’ and ‘GPU’. Thus defining targets using names rather than enumerates. The specific naming of string or enumerates is not enforced by the specification and it is up to the vendors to document and communicate the Target naming. Once available in a given implementation Applications can assign a Target to a node to specify the target that must execute that node by using the API vxSetNodeTarget. For immediate mode functions the target specifies the physical or logical device where the future execution of that function will be attempted. When an immediate mode function is not supported on the selected target the execution falls back to VX_TARGET_ANY.
----------------------------------------------------------------------------------
Thanks.