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-39159 [C++]: Try to make Buffer::device_type_ non-optional #39150

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

felipecrv
Copy link
Contributor

@felipecrv felipecrv commented Dec 8, 2023

Rationale for this change

Buffer should always have a device type. When unspecified, CPU can be assumed.

What changes are included in this PR?

A change of the member variable type and some adjustments.

Are these changes tested?

N/A.

Are there any user-facing changes?

This PR includes breaking changes to public APIs.

Buffer::device_type_ is now a DeviceAllocationType instead of a std::optional<DeviceAllocationType>.

@github-actions github-actions bot added the awaiting review Awaiting review label Dec 8, 2023
@felipecrv
Copy link
Contributor Author

@pitrou if you're OK with the type change I will create an issue for this PR.

@@ -296,6 +296,7 @@ class ARROW_EXPORT Buffer {

const std::shared_ptr<MemoryManager>& memory_manager() const { return memory_manager_; }

/// XXX(felipecrv): can we change the return type to remove the optional?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Dec 8, 2023
@felipecrv felipecrv changed the title [C++]: Try to make Buffer::device_type_ non-optional GH-39159 [C++]: Try to make Buffer::device_type_ non-optional Dec 10, 2023
Copy link

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

@apache apache deleted a comment from github-actions bot Dec 10, 2023
@felipecrv felipecrv marked this pull request as ready for review December 10, 2023 00:04
Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing this @felipecrv

@felipecrv felipecrv merged commit 595b37c into apache:main Dec 11, 2023
33 of 35 checks passed
@felipecrv felipecrv removed the awaiting committer review Awaiting committer review label Dec 11, 2023
@felipecrv felipecrv deleted the require_device_type branch December 11, 2023 14:55
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 595b37c.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 9 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 Dec 13, 2023
…pache#39150)

### Rationale for this change

Buffer should always have a device type. When unspecified, CPU can be assumed.

### What changes are included in this PR?

A change of the member variable type and some adjustments.

### Are these changes tested?

N/A.

### Are there any user-facing changes?

**This PR includes breaking changes to public APIs.**

`Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`.
* Closes: apache#39159

Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
clayburn pushed a commit to clayburn/arrow that referenced this pull request Jan 23, 2024
…pache#39150)

### Rationale for this change

Buffer should always have a device type. When unspecified, CPU can be assumed.

### What changes are included in this PR?

A change of the member variable type and some adjustments.

### Are these changes tested?

N/A.

### Are there any user-facing changes?

**This PR includes breaking changes to public APIs.**

`Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`.
* Closes: apache#39159

Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…pache#39150)

### Rationale for this change

Buffer should always have a device type. When unspecified, CPU can be assumed.

### What changes are included in this PR?

A change of the member variable type and some adjustments.

### Are these changes tested?

N/A.

### Are there any user-facing changes?

**This PR includes breaking changes to public APIs.**

`Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`.
* Closes: apache#39159

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.

[C++] Make Buffer::device_type_ non-optional
2 participants