Azzera filtri
Azzera filtri

GPU Performance Analyzer does not accept Hardware Config argument

26 visualizzazioni (ultimi 30 giorni)
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 Commenti
Chao Luo
Chao Luo il 2 Ago 2024 alle 12:48
Did you setup the hwobj before running gpuPerformanceAnalyzer, like this:
hwobj = jetson('your_board_name_or_IP','user','passwd');
Ryan
Ryan il 2 Ago 2024 alle 16:04
Yes I did. However I figured out the issue. The solution ended up involving your answer to my previous question: https://www.mathworks.com/matlabcentral/answers/2140006-nvidia-jetson-setup-issue-coder-checkgpuinstall-can-t-find-nvcc
Once I added 'cfg.GpuConfig.ComputeCapability = '8.7', the error went away.
%% 3) Code generation
cfg = coder.gpuConfig('dll','ecoder',true);
cfg.Hardware = coder.hardware( "NVIDIA Jetson" );
cfg.GpuConfig.ComputeCapability = '8.7'; % <-- this line fixed the error
inputs = {maxIterations,xGrid,yGrid};
designFileName = 'mandelbrot_count';
gpuPerformanceAnalyzer(designFileName, {maxIterations, xGrid, yGrid}, NumIterations=2, Config=cfg)

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Get Started with GPU Coder in Help Center e File Exchange

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by