-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unaligned numpy arrays #170
Comments
The execution is stuck at It seems similar to http://stackoverflow.com/questions/10306669/opencl-kernel-hangs-forever-unless-i-remove-parameters/42214687#42214687 and the thread at https://lists.tiker.net/pipermail/pyopencl/2012-April/001158.html. But no resolution seems to have been posted. |
To my mind, this is a mailing list/tech support issue more than a bug in PyOpenCL. i'd suggest you use code like this to align your numpy arrays to start with. PyOpenCL can't really do much about the alignment of data that already exists (short of copying, which is almost definitely not what anybody wants). There's also not much of an argument to support that PyOpenCL should do anything about this either, because (e.g.) |
Found a simpler solution at http://numpy-discussion.10968.n7.nabble.com/Byte-aligned-arrays-td3887.html which fixes alignment, but is still a bit messy
|
For FPGA execution of OpenCL kernels, the board expects 64-byte aligned host arrays. However, there seems to be no way to get numpy arrays to obey custom alignments (It seems the inbuilt ALIGNMENT length is 16 or some such). In most cases, this is harmless, but sometimes it cases the FPGA OpenCL kernel to stall/freeze. I'm wondering if there's some way to get PyOpenCL to align buffers on the host prior to transfer?
The text was updated successfully, but these errors were encountered: