Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-11872

[C++] Array Validation of GPU buffers fails due to incorrect validation check

    XMLWordPrintableJSON

Details

    Description

      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); }
      

       

      Attachments

        Issue Links

          Activity

            People

              paul.e.taylor Paul Taylor
              galipremsagar Prem Sagar Gali
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m