mc-imperial / gpuverify

GPUVerify: a Verifier for GPU Kernels
http://multicore.doc.ic.ac.uk/tools/GPUVerify/
Other
58 stars 15 forks source link

async_work_group_copy with destination of mixed type not supported #26

Closed robinchrist closed 5 years ago

robinchrist commented 6 years ago

Hello,

I tried to check a kernel which heavily depends on async_work_group_copy.

3 warnings generated. OpenCL3.opt.bc: error: async_work_group_copy with destination of mixed type not supported Please contact the developers; this is an implementation limitation

I don't know what this error means, since the destinations are always __local float4*.

afd commented 6 years ago

Hi Robin

Would you be able to send a small code example that issues this warning where you believe it should not?

Thanks

Ally

On 28/01/2018 23:10, Robin Christ wrote:

Hello,

I tried to check a kernel which heavily depends on async_work_group_copy.

|3 warnings generated. OpenCL3.opt.bc: error: async_work_group_copy with destination of mixed type not supported Please contact the developers; this is an implementation limitation|

I don't know what this error means, since the destinations are always __local float4*.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mc-imperial/gpuverify/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/AEhSXdJDjhH3m95wL2-lc5qWaKWHu3n2ks5tPP58gaJpZM4Rv5wa.

robinchrist commented 6 years ago

Hi Ally,

I will need to reduce the source code, but I could provide the whole source code via personal message or email. Would that be okay for you?

jeroenk commented 6 years ago

I don't know what this error means

It's an internal problem in Bugle, GPUVerify's LLVM to Boogie translator. It most likely signals that Bugle's pointer analysis fails to do the right thing on its first iteration. It would be really helpful to see a reduced kernel that triggers this behaviour.

robinchrist commented 6 years ago

It would be really helpful to see a reduced kernel that triggers this behaviour. I will provide a reduced kernel as soon as possible.

The kernel uses a double buffering technique with two buffers, where data is asynchronously loaded into the buffer which is not used. After the calculation and the async copy finished, the pointers to the buffers are swapped. I assume Boogie is not able to "understand", that the buffers or rather the pointers to them are swapped.

jeroenk commented 6 years ago

Going by your description, I guess there’s a loop in which this all happens. If so, cutting down the kernel might be as simple as keeping the loop with the async call(s) and maybe one access to the array you’re actually using.

On 29 Jan 2018, at 08:48, Robin Christ notifications@github.com wrote:

It would be really helpful to see a reduced kernel that triggers this behaviour. I will provide a reduced kernel as soon as possible.

The kernel uses a double buffering technique with two buffers, where data is asynchronously loaded into the buffer which is not used. After the calculation and the async copy finished, the pointers to the buffers are swapped. I assume Boogie is not able to "understand", that the buffers or rather the pointers to them are swapped.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jeroenk commented 6 years ago

I believe I locally have a fix for this issue.

@robinchrist How did you obtain GPUVerify? Did you compile it yourself, or are you using a nightly build? I'm trying to figure out how to best get the fix to you to try.

robinchrist commented 6 years ago

@jeroenk I used the nightly build available from the website (packed 2015-09-25).

jeroenk commented 6 years ago

@robinchrist Do you use the Windows or the Linux build?

robinchrist commented 6 years ago

@jeroenk I am using Windows 10.

jeroenk commented 6 years ago

@robinchrist Thanks. In that case I'll create a new Windows nightly for you. Please give me a few days.

jeroenk commented 6 years ago

@robinchrist I dropped a new build here: https://github.com/jeroenk/gpuverify/releases/tag/fusion-async (grab the deploy.zip file from there).

Please let me know if this solves your problem.

jeroenk commented 6 years ago

@robinchrist Did the updated build work for you?

jeroenk commented 5 years ago

We believe we fixed this. Please open a new issue if there are still problems with this.