-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clBuildProgram segfaults when building libDNN kernels on Snapdragon 835 #69
Comments
This can be reproduced as follows.
(NB: To save time, you can interrupt the installation straight after the cloning.)
|
Ok. Now it seems the same context is used for LibDNN kernels, right? |
Two different contexts used for the main kernels and the libDNN kernels (what I reported to you via Skype) must have been a fidget of my imagination, sorry. I now see the contexts are always the same. But the driver segfaults always in the same place. This is weird because by disabling ViennaCL caching I effectively ensured that the driver is fed the libDNN program as source via I think I should report this issue to Qualcomm. Even if the libDNN program is ill-formed (unlikely due to For reference, here's the driver info:
|
Thanks. Yes I noticed a similar problem actually with windows AMD drivers where the driver would segfault if the This is why there's this quirky line in it:
Maybe removing the |
I will try with:
changing the code, for example, as follows:
NB: One additional manual fix is required in
|
I've got a build failure with the above change:
This is the offending code in context with hopefully correct line numbers:
|
Hm just removing the pragmas can't cause that, there must have been a case where more was done than just commenting out the pragma, i.e. the stringstream misses a bracket or similar now. |
Hmm, I've made a deliberate typo in the source to print the original program, and, indeed, apart from the removed
It seems that the first loop nest is doubly nested but it's terminated with three braces. This is where the brace imbalance may come from. But I'm lost to why removing an unroll pragma has this effect of introducing additional code. |
It seems that you accidentally uncommented the lines 1050 to 1072? That would be my guess.
|
Ha, that would explain it, thanks! My regex wasn't good enough. I'll try again. |
With the new regex only replacing
I produced a program without I've sent the original program to the top OpenCL guys at Qualcomm. Will report back any workarounds they suggest. |
Ok thanks a lot. I currently have no other suggestion as to what could go wrong. |
I've got a reply from Qualcomm which they allowed me to share here:
|
@naibaf7 I don't suppose you want to merge the above workaround to libDNN? I could probably try it on a separate branch if you would suggest me where to put these changes in. |
@psyhtest Thanks this is great to know. No I don't want to hard-code that into the code, but there are actually tuning parameters that change the vectorization data type, so if I remember my own code correctly, setting the LibDNN internal tuning parameters correctly should allow to compile it. I'll also consider testing vector data access as a part of the pre-tuning phase of LibDNN then... |
I've encountered segfaults in Caffe with libDNN on a Snapdragon 835 powered smartphone.
Caffe succeeds to build the main Greentea kernels:
After the net is initialized, however, Caffe attempts to build the libDNN kernels and segfaults in
clBuildProgram
:The text was updated successfully, but these errors were encountered: