I've tested your code on AMD APU: running it on GPU does
not crash, but running on CPU causes crash.
It is not related to memory transfer - crash occurs even
when I comment out cl.enqueue_copy.
OTOH code does not crash when I comment out kernel call,
or when I comment out line
in the kernel.
Probably you have problems with code in your kernel accessing
memory outside allocated buffers - and it causes crashes.
Tomasz Rybak GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860