Matlab GPU coder for Jetson TX1 fails with "Non-Coalesced variable" ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm just a noob to GPU Coder, I'm converting a function to CUDA code via GPU coder, I have a list of question.
1. The code I desire to convert on GPU Coder takes a minimum of 18-20 hrs, the system is well equipped though with 96gigs of RAM, 16 core CPU and 2x Nvidia 1080Ti ? Is there anything that I can do about this ?
2. Upon completion, I receive these list of erros such as follows.
* " Non-coalesced access to variable Opyr_got_lvl_10 detected. Consider transposing variable or interchanging the surrounding loops, if possible." ; this occurs for several other variables too !
* "cuSolver replacement may be interfering with parallel kernel inference. Consider disabling cuSOLVER replacement to infer larger GPU kernels.";
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192043/image.png)
Please enlighten me on how to solve these issues, its is quite urgent. Any help is appreciated in advance.
2 Kommentare
Walter Roberson
am 10 Nov. 2018
To check: is that 18-20 hours just to compile with GPU Coder, or is the execution time on the GPU when you run the compiled program?
Antworten (1)
Vandana Ravichandran
am 7 Dez. 2018
@Sathyaprakash
1 . I looked at the attached code, it seems to be very long. Since GPU coder using aggressive inlining, all the functions called from your code are inlined inside the main function, which is probably why it takes a lot of time to generate code. I would suggest you to break the code down into smaller functions and use inline "never". For e.g.,
function out = mainfunction(in)
out1 = dofft(in);
out = doresize(out1);
end
function b = dofft(a)
coder.inline('never');
b = fft(a);
end
function b = doresize(a)
coder.inline('never');
b = imresize(a);
end
2. The list of errors provided are actually not errors but rather warnings. They are meant for diagnostic purposes to assist the user to write better MATLAB code that will result in better GPU code. For e.g. cusolver library from CUDA is used in code generation. But sometimes, this might interfere with kernel creation for other parallel regions in the code. So, a warning is thrown to inform the user to try disabling cusolver using "EnableCUSOLVER" flag to see if the performance improves.
This feature has been improved in R2018b, so try upgrading to the latest version of MATLAB.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with GPU Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!