Customizing GPU Computing Using the LabVIEW GPU Analysis Toolkit

Updated Dec 18, 2023

Reported In


  • LabVIEW GPU Analysis Toolkit

Issue Details

How can I create a VI wrapper for calling a custom GPU function based on interfaces like CUDA?


The LabVIEW GPU Analysis Toolkit ships with VI wrappers that leverage functionality exported by NVIDIA® libraries. These wrappers are VIs published on the LVCUDA, LVCUDA Driver API, LVCUBLAS and LVCUFFT palettes and exemplify how a custom GPU function is called from a LabVIEW diagram. The framework on which these VI wrappers are built is called the LVGPU SDK. It can be used to incorporate most user-defined, co-processor based functions and is well suited for calling custom functions based on NVIDIA CUDA™.

The information in the zip file below contains a step-by-step guide for constructing a custom function wrapper for calling a CUDA-based GPU function. Although the descriptions in each step may be specific to NVIDIA GPUs, the concepts are relevant to most co-processor targets and apply to calling functions derived from other published APIs based on standards such as OpenCL™ or OpenACC®. Why the SDK is needed or how it works internally is not addressed here.

The process outlined in the step-by-step instructions results in a VI wrapper with three distinct layers. These layers are responsible for parameter protection, execution preparation, and function invocation. When a function call's prototype specifies a data type not currently supported by the SDK, an additional set of steps is required to create an SDK data wrapper for that type.

To access the step-by-step instructions for creating function wrappers, save and unzip the attached file. Locate the LabVIEW GPU Analysis Toolkit - Calling Custom GPU Functions PDF and follow the provided steps. Use all other content in the zip file as prompted in the step-by-step instructions.