Skip to content
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

GH-43854: [C++] Expose the set of device types where a ChunkedArray is allocated #43853

Merged
merged 7 commits into from
Aug 28, 2024

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
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
38 of 41 checks passed
@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
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.

mapleFU pushed a commit to mapleFU/arrow that referenced this pull request Sep 3, 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>
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