[
https://issues.apache.org/jira/browse/ARROW-11872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17296069#comment-17296069
]
Prem Sagar Gali commented on ARROW-11872:
-----------------------------------------
cc: [~paul.e.taylor]
> Array Validation of GPU buffers fails due to incorrect validation check
> -----------------------------------------------------------------------
>
> Key: ARROW-11872
> URL: https://issues.apache.org/jira/browse/ARROW-11872
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Affects Versions: 3.0.0
> Reporter: Prem Sagar Gali
> Priority: Major
>
> Whenever we try to create an array or a Table from a GPU buffer we get the
> following Invalid missing values buffer error.
> pyarrow/table.pxi:485: in pyarrow.lib.chunked_array
> ???
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ???
> E pyarrow.lib.ArrowInvalid: In chunk 0: Invalid: Missing values buffer in
> non-empty arraypyarrow/error.pxi:84: ArrowInvalid
> This is because the GPU buffers aren't passing the following validation
> check:
> [https://github.com/apache/arrow/blob/7be266be98d08214ef4b3f067059b6e6a8a6e5c0/cpp/src/arrow/array/validate.cc#L183]
>
> But this has to be changed to something like:
> static bool IsBufferValid(const ArrayData& data, int index) {
> return data.buffers[index] != nullptr && (data.buffers[index]->is_cpu() ?
> data.buffers[index]->data() != nullptr : true);
> }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)