Matlab GPU coder for Jetson TX1 fails with "Non-Coalesced variable" ?
1 view (last 30 days)
Show older comments
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.";
Please enlighten me on how to solve these issues, its is quite urgent. Any help is appreciated in advance.
2 Comments
Walter Roberson
on 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?
Answers (1)
Vandana Ravichandran
on 7 Dec 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 Comments
See Also
Categories
Find more on Get Started with GPU Coder 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!