AMD mesa OpenCL kernel compilation error, fix suggestion

Message boards : Bug tracker : AMD mesa OpenCL kernel compilation error, fix suggestion

To post messages, you must log in.

AuthorMessage
Tomáš Brada

Send message
Joined: 5 Mar 17
Posts: 3
Credit: 3,637,098
RAC: 0
   
Message 642 - Posted: 19 Oct 2017, 15:48:31 UTC
Last modified: 19 Oct 2017, 16:10:26 UTC

Hello, I am getting computational errors on my system. I have AMD RX 560 driven by the opensource radeon drivers. The error is:
input.cl:17:1: error: OpenCL version 1.1 does not support the 'static' storage class specifier
I found the error in this issue which also includes a solution. Apparently including a pragma on top of the opencl file enables the static class and solves the error:
#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable

I have tried to edit the opencl code in the binary, but there is checksum making the app fail immediately.
ID: 642 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Sergei Chernykh
Project administrator
Project developer

Send message
Joined: 5 Jan 17
Posts: 513
Credit: 72,451,573
RAC: 0
   
Message 643 - Posted: 19 Oct 2017, 16:28:45 UTC - in response to Message 642.  

You don't need to edit the binary, source code is here: https://github.com/SChernykh/Amicable/tree/boinc-opencl-version-128-bit
You can edit and compile it yourself or wait for me. I'll update the GPU version tomorrow.
ID: 643 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Sergei Chernykh
Project administrator
Project developer

Send message
Joined: 5 Jan 17
Posts: 513
Credit: 72,451,573
RAC: 0
   
Message 644 - Posted: 20 Oct 2017, 5:57:56 UTC
Last modified: 20 Oct 2017, 7:33:35 UTC

ID: 644 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Sergei Chernykh
Project administrator
Project developer

Send message
Joined: 5 Jan 17
Posts: 513
Credit: 72,451,573
RAC: 0
   
Message 645 - Posted: 20 Oct 2017, 12:03:40 UTC

It looks like it just crashes on your PC now when it tries to compile OpenCL code:

SIGSEGV: segmentation violation
Stack trace (19 frames):
../../projects/sech.me_boinc_Amicable/amicable_OpenCL_v_2_06(boinc_catch_signal+0x65)[0x4373a5]
/usr/lib/libpthread.so.0(+0x117e0)[0x7f967051a7e0]
/usr/lib/libLLVM-4.0.so(_ZN4llvm11Instruction15eraseFromParentEv+0x2c)[0x7f961c4b4b9c]
/usr/lib/libLLVM-4.0.so(+0x1938224)[0x7f961d60b224]
/usr/lib/libLLVM-4.0.so(+0x1937c3b)[0x7f961d60ac3b]
/usr/lib/libLLVM-4.0.so(+0x1939890)[0x7f961d60c890]
/usr/lib/libLLVM-4.0.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x311)[0x7f961c4df791]
/usr/lib/libLLVM-4.0.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x32)[0x7f961c4df7d2]
/usr/lib/libLLVM-4.0.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x312)[0x7f961c4def62]
/usr/lib/libMesaOpenCL.so.1(+0x1ddb4e)[0x7f961faf8b4e]
/usr/lib/libMesaOpenCL.so.1(+0x1de160)[0x7f961faf9160]
/usr/lib/libMesaOpenCL.so.1(+0x1d9862)[0x7f961faf4862]
/usr/lib/libMesaOpenCL.so.1(+0x1cac04)[0x7f961fae5c04]
/usr/lib/libMesaOpenCL.so.1(+0x1aa16f)[0x7f961fac516f]
/usr/lib/libOpenCL.so.1(clBuildProgram+0x4b)[0x7f96700ed65b]
../../projects/sech.me_boinc_Amicable/amicable_OpenCL_v_2_06[0x411629]
../../projects/sech.me_boinc_Amicable/amicable_OpenCL_v_2_06[0x406a21]
/usr/lib/libc.so.6(__libc_start_main+0xea)[0x7f966fa4a4ca]
../../projects/sech.me_boinc_Amicable/amicable_OpenCL_v_2_06[0x407855]
ID: 645 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tomáš Brada

Send message
Joined: 5 Mar 17
Posts: 3
Credit: 3,637,098
RAC: 0
   
Message 646 - Posted: 20 Oct 2017, 13:58:34 UTC - in response to Message 645.  
Last modified: 20 Oct 2017, 13:58:55 UTC

Yes I am aware. I had mesa-git and opencl-nvida installed. I uninstalled this packages and upgraded my system. Now I am trying with stable mesa and opencl-amd.
ID: 646 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tomáš Brada

Send message
Joined: 5 Mar 17
Posts: 3
Credit: 3,637,098
RAC: 0
   
Message 647 - Posted: 21 Oct 2017, 17:41:55 UTC

I confirmed that the application works on Mesa (GIT 73749caf0e) OpenCL 1.1 implementation. The reason why I used mesa is that the closed-source AMDGPUPRO kernel module was failing for me and I thought that the OpenCL component requires it. Turns out, AMD closed-source implementation of OpenCL can work without rest of amdgpupro. Amdgpupro is OpenCL 1.2 and I confirmed that it works too.
ID: 647 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote

Message boards : Bug tracker : AMD mesa OpenCL kernel compilation error, fix suggestion


©2024 Sergei Chernykh