[PyCUDA] [Pycuda] LogicError: cuMemcpyDtoH failed: an illegal memory access was encountered

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PyCUDA] [Pycuda] LogicError: cuMemcpyDtoH failed: an illegal memory access was encountered

Morvan
Hallo,

I have a Pycuda code, which deals with two kernels. Both kernels run well
separately, but when I put them together, there is  a memory problem
"LogicError: cuMemcpyDtoH failed: an illegal memory access was encountered".
In the second kernel "DotKernel", I can't change the values of any shared
array or global array. Could you please have a look at the code? Thank you
very much!

Best regards,

Morvan


_______________________________________________
PyCUDA mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]

test0.py (9K) Download Attachment
smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[PyCUDA] Re: [Pycuda] LogicError: cuMemcpyDtoH failed: an illegal memory access was encountered

Andreas Kloeckner
Jie Liu <[hidden email]> writes:

> Hallo,
>
> I have a Pycuda code, which deals with two kernels. Both kernels run well
> separately, but when I put them together, there is  a memory problem
> "LogicError: cuMemcpyDtoH failed: an illegal memory access was encountered".
> In the second kernel "DotKernel", I can't change the values of any shared
> array or global array. Could you please have a look at the code? Thank you
> very much!

If you look at your kernel log (dmesg), do you see lines starting with
"NVRM: Xid" (or so)? If so, that indicates one of your kernels
encounters a segfault (that you're being told about at the next
dependent operation---in your case maybe the memory transfer---in the
same stream).

CUDA-Memcheck might be of help in debugging this.

Andreas

_______________________________________________
PyCUDA mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]

signature.asc (847 bytes) Download Attachment