One of the most powerful new features in G2CPU v1.6 is full support for the NI LabVIEW Desktop Execution Trace Toolkit (DETT).
Memory leaks can be notoriously difficult to catch—especially in high-performance LabVIEW applications using technologies like CUDA, OpenCL, or ArrayFire. With G2CPU, these accelerated backends are fully integrated into LabVIEW, but debugging memory issues across CPU and GPU memory spaces has remained a challenge—until now.
With DETT integration, G2CPU now brings these hidden memory operations into view, allowing you to find and fix leaks faster and with greater precision. Whether you’re allocating pinned CPU memory for data acquisition or large GPU arrays for numerical processing, you can now see exactly what happens—and where memory is (or isn’t) released.
When DETT tracing is enabled, every memory allocation and deallocation performed through G2CPU is logged and tagged. This includes backend calls to CUDA, OpenCL, and ArrayFire, all wrapped within your familiar LabVIEW code. Each trace event includes the function name, event type (allocation or deallocation), datatype, dimension count, call chain, and a unique Array ID.
This is a game-changer for NI developers building GPU-accelerated LabVIEW applications. It’s particularly useful in complex systems where dynamic memory handling is common and leaks can severely impact performance or stability. With DETT support, you can confidently verify that your application allocates and releases memory as expected—across all supported backends.
To use this feature, open the LabVIEW Desktop Execution Trace Toolkit and enable "User-Defined Trace Events" under the trace options. Then run your G2CPU-based application.
Below, you’ll see a list of all memory operations as they occur. This gives developers using LabVIEW real-time insight into memory behavior across CPU and GPU layers.
Copy the Array ID from any event and paste it into DETT’s search bar to find all occurrences of that specific memory block throughout the trace log.
This allows you to easily verify whether a matching deallocation exists for a given allocation. If memory is properly released, you’ll see a corresponding deallocation event as shown here.
At the end of execution, “G2CPU Cleanup” generates a summary of any memory that was not released. This view provides immediate insight into potential leaks and where they originated.
This feature will be available in both the free Community Edition and the Commercial Edition of G2CPU. Whether you're using CUDA for dense matrix work or OpenCL for cross-platform flexibility, you now have the tools to keep your memory usage clean and predictable—within your LabVIEW workflow.
Licenses are distributed by National Instruments. And as always, we welcome your feedback as we continue to improve the toolkit.
New in G2CPU V1.6.1: Toggle DETT
With G2CPU V1.6.1 we added the ability to toggle DETT support on or off through "G2CPU DETT Debugging" in the functions palette.
You can simply enable DETT GPU debugging by setting the input to True.
Once done, you can disable DETT debugging for added performance or just don't need the added influx of entries in DETT.






