Tutorial Python Node: CPU/GPU Bundles
This is a tutorial node. It exercises functionality for accessing data in bundles that are on the GPU as well as bundles whose CPU/GPU location is decided at runtime. The compute looks for bundled attributes named ‘points’ and, if they are found, computes the dot products. If the bundle on the output contains an integer array type named ‘dotProducts’ then the results are placed there, otherwise a new attribute of that name and type is created on the output bundle to hold the results. This node is identical to OgnTutorialCpuGpuBundles.ogn, except is is implemented in Python.
Installation
To use this node enable omni.graph.tutorials in the Extension Manager.
Inputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
CPU Input Bundle (inputs:cpuBundle) |
|
Input bundle whose data always lives on the CPU |
None |
Results To GPU (inputs:gpu) |
|
If true then copy gpuBundle onto the output, otherwise copy cpuBundle |
False |
GPU Input Bundle (inputs:gpuBundle) |
|
Input bundle whose data always lives on the GPU |
None |
Outputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Constructed Bundle (outputs:cpuGpuBundle) |
|
This is the bundle with the merged data. If the ‘gpu’ attribute is set to true then this bundle’s contents will be entirely on the GPU, otherwise it will be on the CPU. |
None |
Metadata
Name |
Value |
---|---|
Unique ID |
omni.graph.tutorials.CpuGpuBundlesPy |
Version |
1 |
Extension |
omni.graph.tutorials |
Icon |
ogn/icons/omni.graph.tutorials.CpuGpuBundlesPy.svg |
Has State? |
False |
Implementation Language |
Python |
Default Memory Type |
cpu |
Generated Code Exclusions |
None |
tags |
tutorial,bundle,gpu |
uiName |
Tutorial Python Node: CPU/GPU Bundles |
__tokens |
[“points”, “dotProducts”] |
Categories |
tutorials |
Generated Class Name |
OgnTutorialCpuGpuBundlesPyDatabase |
Python Module |
omni.graph.tutorials |
See the accompanying tutorial and annotated code at Tutorial 22 - Bundles On The GPU