-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-43589: [Python] Add bindings for Buffer copy() method to other device #43590
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
base: main
Are you sure you want to change the base?
Conversation
|
|
5d9937a to
a20e09f
Compare
jorisvandenbossche
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments on the tests. I think it would also be fine for this PR to just focus on adding a copy method, and then this should be more or less ready?
|
@github-actions crossbow submit test-cuda-python |
|
Revision: a64d54d Submitted crossbow builds: ursacomputing/crossbow @ actions-b9914c094c
|
danepitkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
danepitkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM! Do you plan to add the other checkbox items to this PR? If not, then I give it approval 👍
|
@danepitkin We decided to move those to a separate PR! |
|
@github-actions crossbow submit test-cuda-python |
2e10905 to
9319543
Compare
|
@github-actions crossbow submit test-cuda-python |
|
|
@github-actions crossbow submit test-cuda-python |
|
|
@github-actions crossbow submit testcudapy* |
|
Revision: 9319543 Submitted crossbow builds: ursacomputing/crossbow @ actions-9f9dcb6f39
|
|
@anjakefala added a few more comments on the tests, but for the rest looks good! |
|
@github-actions crossbow submit testcudapy* |
|
Revision: 230abf2 Submitted crossbow builds: ursacomputing/crossbow @ actions-b9e1188e21
|
|
Is anything else needed before merging? The failed CI seems unrelated. |
| Parameters | ||
| ---------- | ||
| destination : pyarrow.MemoryManager or pyarrow.Device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required, but it may be nice to also allow a MemoryPool here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a way to map a given MemoryPool to a device manager (AFAIK), so in that case you mean to use a different API under the hood to copy to the memory pool? (Buffer::CopySlice seems to allow that, or first explicitly allocate a new Buffer of the correct size using the memory pool and then copying the data to it?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use
Lines 295 to 298 in c557fe5
| /// \brief Create a MemoryManager | |
| /// | |
| /// The returned MemoryManager will use the given MemoryPool for allocations. | |
| static std::shared_ptr<MemoryManager> memory_manager(MemoryPool* pool); |
|
Thank you for your contribution. Unfortunately, this pull request has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this PR will be closed in 14 days. Feel free to re-open this if it has been closed in error. If you do not have repository permissions to reopen the PR, please tag a maintainer. |
WIP. Feel free to make any comments while this is under active development!
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?