Skip to content

Conversation

@felipecrv
Copy link
Contributor

@felipecrv felipecrv commented Aug 27, 2024

Rationale for this change

ChunkedArrays allow flexible allocation of arrays -- the whole array doesn't have to be allocated in huge contiguous buffers. Nothing today prevents chunked arrays from being made of chunks allocated in different devices and that is good. But we need a way to query the set of devices where a chunked array is allocated at. This PR adds that missing part.

What changes are included in this PR?

Addition of:

  • the DeviceAllocationTypeSet class
  • ChunkedArray::device_types()
  • Datum::device_types()

Moved enum DeviceAllocationType to the type_fwd.h header because device.h is too expensive of a header to hold this widely used enum.

Are these changes tested?

Added more asserts to chunked_array_test.cc.

Are there any user-facing changes?

New APIs.

@felipecrv felipecrv changed the title [C++] Expose the set of device types where a ChunkedArray is allocated GH-43854: [C++] Expose the set of device types where a ChunkedArray is allocated Aug 27, 2024
@apache apache deleted a comment from github-actions bot Aug 27, 2024
@felipecrv felipecrv requested a review from bkietz August 27, 2024 18:54
@github-actions
Copy link

⚠️ GitHub issue #43854 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Aug 27, 2024
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Aug 27, 2024
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Aug 27, 2024
@felipecrv felipecrv requested a review from bkietz August 27, 2024 21:23
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Aug 28, 2024
@felipecrv felipecrv merged commit 0bc91dd into apache:main Aug 28, 2024
@felipecrv felipecrv removed the awaiting merge Awaiting merge label Aug 28, 2024
@felipecrv felipecrv deleted the chunked_array_device_types branch August 28, 2024 18:14
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 0bc91dd.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.

khwilson pushed a commit to khwilson/arrow that referenced this pull request Sep 14, 2024
…rray is allocated (apache#43853)

### Rationale for this change

`ChunkedArray`s allow flexible allocation of arrays -- the whole array doesn't have to be allocated in huge contiguous buffers. Nothing today prevents chunked arrays from being made of chunks allocated in different devices and that is good. But we need a way to query the set of devices where a chunked array is allocated at. This PR adds that missing part.

### What changes are included in this PR?

Addition of:
- the `DeviceAllocationTypeSet` class
- `ChunkedArray::device_types()`
- `Datum::device_types()`

Moved `enum DeviceAllocationType` to the `type_fwd.h` header because `device.h` is too expensive of a header to hold this widely used `enum`.

### Are these changes tested?

Added more asserts to `chunked_array_test.cc`.

### Are there any user-facing changes?

New APIs.
* GitHub Issue: apache#43854

Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants