-
Notifications
You must be signed in to change notification settings - Fork 16
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
Transpose on padded arrays - unclear #44
Comments
I think it is working correctly; the problem arises when you copy it to the CPU. So far I've been relying on PyCUDA/PyOpenCL to do that, but they currently have problems with non-standard offsets and strides. |
Also, I'm not even sure it is possible to create an array with offset in |
Is there any way to write Barring that, I suppose it'd work if I pass |
... Actually, I can't do that, because there's no way to plan the creation of an array that takes a |
Could you point me to the relevant place in the docs?
I don't think PyCUDA supports it, and by extension, neither does Reikna.
Or, perhaps,
As long as the padded array stays on GPU, it is processed correctly. It's only when you copy it the problems arise. The question is, what variant to prefer: remove the padding on copy and return a contiguous array on CPU, or preserve the structure and return a padded array (well, technically, both can be available, but one has to be the default)? Do you need the latter in your code? |
Well, for example, we have
Unfortunate.
Ooh. Yes, that does look promising. Thanks.
Not on return, no. As long as I'm processing it I need the padding, but when I transfer it back, then for this code in particular at least I'm basically done with processing and only care about prettyprinting of one form or another. |
Related to the last issue - it's not entirely clear how to use
Transpose
on a padded array. After fixing my silly mistake last time, my output reads:For comparison, the correct result ought to be
plus or minus some padding zeroes.
Now, I might just be using
Transpose
's new padding feature wrong - but, uh, in that case I'm not entirely sure how to use it right, so a documentation update might be in order.Thanks!
The text was updated successfully, but these errors were encountered: