Hi,

I have done more testing in the last few days. The issues I had with Intel
OpenCL and debug symbols enabled were not related (actually a confirmed bug
in the Intel driver that leads to crashes with the -g compile option).

I have now managed to get oclgrind to work properly without creating
coredumps itself. oclgrind found another issue, which I fixed. But it was
not the cause of the bug. The call to oclgrind I have used is:

 oclgrind --check-api --data-races --uniform-writes --uninitialized python
./test_p1.py

oclgrind runs all the check without giving any kind of warning message and
then completes the kernel successfully without crashing.

So far the kernel works well in beignet (single precision), Intel OpenCL
(single/double precision), and the AMDGPU Pro OpenCL driver (single/double
precision). Only
pocl crashes. I tested it under Fedora 28 and Ubuntu 18.04 with the
distribution packages (version 1.1), both the same results. I tried to
compile pocl on a centos machine, but had some compilation issues, so did
not investigate further there.

I used the disassembly hint for gdb. The crash is in line 310. The
associated gist is here:

https://gist.github.com/tbetcke/087b18ad7a238b0528d68805e5c46f14

You can find the source code of the kernel here:

https://gist.github.com/tbetcke/c685568273f4df7250ed643524d6b175

I tried to create a simpler example for error reporting purposes, but could
not reproduce it with smaller code. It seems to be associated with the
nested for-loops in the kernel.
If I pull the inner for-loops out by caching the generated data, the crash
disappears. Unfortunately, then I also get roughly 50% worse performance
with the Intel OpenCL driver.

I hope that the description helps a little bit. It would be great to be
able to figure out what's going wrong with pocl in this situation.

Best wishes

Timo


On Mon, 4 Jun 2018 at 16:32, Timo Betcke <[email protected]> wrote:

> Hi,
>
> thanks for all your hints. I have done more experiments over the weekend,
> and I managed to observe
> core dumps also with the Intel OpenCL driver if I compile the kernel with
> debug information ('-g' as option
> in the kernel build). So it seems to be an issue not just related to pocl
> and I need to do some further debugging to see
> what is going on.
>
> Best wishes
>
> Timo
>
>
>
>
> On Sun, 3 Jun 2018 at 18:55, Michal Babej <[email protected]>
> wrote:
>
>> Hi,
>>
>> > I am a bit at a loss right now. Does anybody have any other ideas? It
>> > would be good to be able to run the kernel
>> > with full debug symbols so that valgrind or gdb can give some more
>>
>> Pocl currently compiles the kernels without debuginfo, and while adding
>> a debug option is quite easy, Pocl does a lot of transformation on the
>> compiled bitcode, so making sure the debuginfo still makes sense after
>> all transforms, could be quite a bit of work.
>>
>> Can you try disassembling the kernel crash ? gdb commands are
>> "set disassembly-flavor intel" and "disassemble". Find the instruction
>> that's crashing (has a "=>" next to it) and print the contents of
>> registers ("info registers"). Then pastebin the all this somewhere.
>>
>> Regards,
>> -- mb
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> pocl-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pocl-devel
>>
>
>
> --
> Dr Timo Betcke
> Reader in Mathematics
> University College London
> Department of Mathematics
> E-Mail: [email protected]
> Tel.: +44 (0) 20-3108-4068
> Fax.: +44 (0) 20-7383-5519
>


-- 
Dr Timo Betcke
Reader in Mathematics
University College London
Department of Mathematics
E-Mail: [email protected]
Tel.: +44 (0) 20-3108-4068
Fax.: +44 (0) 20-7383-5519
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to