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

ARROW-15424: [C++][GLib] Fix CUDA bindings #12237

Closed
wants to merge 2 commits into from

Conversation

lidavidm
Copy link
Member

ARROW-15373 changed MemoryManager::AllocateBuffer to return
unique_ptr; the GLib bindings needed updating for this, however.
Also, tweaked the C++ since some compilers don't implicitly
convert unique_ptr to shared_ptr on return.

ARROW-15373 changed MemoryManager::AllocateBuffer to return
unique_ptr; the GLib bindings needed updating for this, however.
Also, tweaked the C++ since some compilers don't implicitly
convert unique_ptr to shared_ptr on return.
@github-actions
Copy link

@lidavidm
Copy link
Member Author

@github-actions crossbow submit test-ubuntu-default-docs

@github-actions
Copy link

Revision: 4ce284d

Submitted crossbow builds: ursacomputing/crossbow @ actions-1475

Task Status
test-ubuntu-default-docs Azure

Comment on lines 289 to 293
auto arrow_buffer = arrow_context->Allocate(size);
if (garrow::check(error, arrow_buffer, "[cuda][buffer][new]")) {
return garrow_cuda_buffer_new_raw(&(*arrow_buffer));
std::shared_ptr<arrow::cuda::CudaBuffer> cuda_buffer =
arrow_buffer.MoveValueUnsafe();
return garrow_cuda_buffer_new_raw(&cuda_buffer);
Copy link
Member

Choose a reason for hiding this comment

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

Could you use arrow_ prefix for C++ objects?

auto arrow_buffer_result = arrow_context->Allocate(size);
if (garrow::check(error, arrow_buffer_result, "[cuda][buffer][new]")) {
  std::shared_ptr<arrow::cuda::CudaBuffer> arrow_buffer = *arrow_buffer_result;
  return garrow_cuda_buffer_new_raw(&arrow_cuda_buffer);

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, ok, I've updated it. (There still needs to be a std::move to convert from unique_ptr to shared_ptr, though.)

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

@kou
Copy link
Member

kou commented Jan 25, 2022

@github-actions crossbow submit test-ubuntu-default-docs

@github-actions
Copy link

Revision: 02b0409

Submitted crossbow builds: ursacomputing/crossbow @ actions-1482

Task Status
test-ubuntu-default-docs Azure

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

@kou kou closed this in 8b3e067 Jan 25, 2022
@ursabot
Copy link

ursabot commented Jan 25, 2022

Benchmark runs are scheduled for baseline = c76215f and contender = 8b3e067. 8b3e067 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.48% ⬆️0.04%] ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@lidavidm lidavidm deleted the arrow-15424 branch January 25, 2022 14:00
pitrou pushed a commit to pitrou/arrow that referenced this pull request Jan 25, 2022
ARROW-15373 changed MemoryManager::AllocateBuffer to return
unique_ptr; the GLib bindings needed updating for this, however.
Also, tweaked the C++ since some compilers don't implicitly
convert unique_ptr to shared_ptr on return.

Closes apache#12237 from lidavidm/arrow-15424

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.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.

None yet

3 participants