GPU/CPU Profiling
2 views (last 30 days)
Show older comments
I was wondering if there is any way to determine what part of my code is being run on the GPU and which are being run on the CPU at run time. I've coded my program using gpu arrays and gpu array functions, to the point where I feel I've maxed out those lines efficiency. However, my code runs one cpu core at max capacity. I want to know what lines of code (or which nested functions) are being run so that I can try to A) Optimize and B) Try to distribute the code over my cores in parallel. I see that NVIDIA has their their own gpu profiler http://www.nvidia.com/object/parallel-nsight.html and I was wondering if Mathworks has (or is working on) anything similar. Any ideas?
0 Comments
Answers (1)
Swastik Sarkar
on 28 May 2025
Hi Gregory,
I wanted to share that there is now a dedicated approach to measure the GPU-specific performance of MATLAB code. The following documentation provides detailed guidance on how to profile and optimize GPU-related computations:
I hope you find this resource helpful in analyzing and improving the performance of your code.
0 Comments
See Also
Categories
Find more on GPU Computing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!