GPU/CPU Profiling

2 次查看(过去 30 天)
Gregory Vernon
Gregory Vernon 2011-9-13
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?

回答(1 个)

Swastik Sarkar
Swastik Sarkar 2025-5-28
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.

类别

Help CenterFile Exchange 中查找有关 GPU Computing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by