-
Notifications
You must be signed in to change notification settings - Fork 915
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
[ENH] Support more input data layouts in cudf.from_dlpack
#10849
Comments
cudf.from_dlpack
memory errors for non-unit-stride datacudf.from_dlpack
incorrect results for non-unit-stride data
The silently bad behaviour was turned into actual |
This issue has been labeled |
cudf.from_dlpack
incorrect results for non-unit-stride datacudf.from_dlpack
This issue has been labeled |
Related to #10754, the current implementation of
from_dlpack
requires unit-stride fortran order, and produces appropriate error messages in the unsupported casesConsider
Since
from_dlpack
copies in all cases right now, I think that things can be handled like so:cudaMemcpyAsync
one column at a timestd::fill
for the 1D case, just getting the strides right for the 2D casecudaMemcpy2DAsync
with appropriate choices of pitch and stride for the source arrayHowever, I'm not really sure of the performance implications of these choices, and if the current approach of producing an error and requiring that the caller copy to contiguous fortran-order first before calling
from_dlpack
is not better. For example, for case 4 is it faster to copy to a contiguous buffer first rather than copying column by column?The text was updated successfully, but these errors were encountered: