Matlab GPU coder for Jetson TX1 fails with "Non-Coalesced variable" ?

1 view (last 30 days)
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.";
I'm attaching the code and as well the screen shot of the error.
Please enlighten me on how to solve these issues, its is quite urgent. Any help is appreciated in advance.

Answers (1)

Vandana Ravichandran
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.

Categories

Find more on Get Started with GPU Coder in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!