GPU Performance Analyzer does not accept Hardware Config argument
26 次查看(过去 30 天)
显示 更早的评论
Hello, I am getting an error when passing hardware configuration to the MATLAB GPU Performance Analyzer.
I am using the Mandelbrot Count example along with this tutorial: https://www.mathworks.com/help/gpucoder/ug/gpu-profiling-nvidia-jetson.html to run the GPU Performance Analyzer with my connected NVIDIA Jetson Orin Nano. I can add hardware options to the configuration in two ways:
1: as the tutorial says,
2: after using the config editor GUI when you double click in the variables list.
The ways are commented below:
%% This is an excerpt from my overall script
cfg = coder.gpuConfig('dll','ecoder',true);
% cfg.Hardware = coder.Hardware('NVIDIA Jetson'); % 1. from tutorial
% cfg.Hardware = coder.hardware( "NVIDIA Jetson" ); % 2. directly from cfg GUI
inputs = {maxIterations,xGrid,yGrid};
designFileName = 'mandelbrot_count';
gpuPerformanceAnalyzer(designFileName, {maxIterations, xGrid, yGrid}, NumIterations=2, Config=cfg)
If I uncomment one of those lines, I get an error:
In mandelbrot_count_dll_script (line 36)
Error using gpuPerformanceAnalyzer
Index exceeds the number of array elements. Index must not exceed 0.
Error in mandelbrot_count_dll_script (line 36)
gpuPerformanceAnalyzer(designFileName, {maxIterations, xGrid, yGrid}, NumIterations=2, Config=cfg)
When I run without this hardware configuration it runs without error but defaults to the host machine GPU which defeats the purpose - I need this to run on the NVIDIA Jetson target board. Any help would be much appreciated. Thank you!
2 个评论
Chao Luo
2024-8-2,12:48
Did you setup the hwobj before running gpuPerformanceAnalyzer, like this:
hwobj = jetson('your_board_name_or_IP','user','passwd');
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with GPU Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!