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

Add java API to get size of host memory needed to copy column view #13919

Merged
merged 6 commits into from
Aug 22, 2023

Conversation

revans2
Copy link
Contributor

@revans2 revans2 commented Aug 18, 2023

Description

To help with work for host memory management in java this provides an API to know how much memory is needed on the host to copy the data before it happens.

This was written by @jbrennan333 but I am taking over the patch to get it in.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@revans2 revans2 added 3 - Ready for Review Ready for review by team Java Affects Java cuDF API. Spark Functionality that helps Spark RAPIDS 4 - Needs cuDF (Java) Reviewer improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 18, 2023
@revans2 revans2 self-assigned this Aug 18, 2023
@revans2 revans2 requested a review from a team as a code owner August 18, 2023 21:31
@revans2
Copy link
Contributor Author

revans2 commented Aug 21, 2023

@gerashegalov and @ttnghia sorry to change the code on you. I realized that we already had some C++ code to do almost the exact same thing, so I switched over to use it instead. Just to remove duplication.

Copy link
Contributor

@gerashegalov gerashegalov left a comment

Choose a reason for hiding this comment

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

LGTM, just optional nits

java/src/main/java/ai/rapids/cudf/ColumnView.java Outdated Show resolved Hide resolved
java/src/main/native/src/ColumnViewJni.cpp Outdated Show resolved Hide resolved
@revans2
Copy link
Contributor Author

revans2 commented Aug 21, 2023

Great catch @razajafri I updated the code to follow the alignment that C++ says it should be. Turns out, at least for my desktop, it is 32-byte aligned. So 64-bytes was not too far off for what we really wanted.

@razajafri
Copy link
Contributor

build

@revans2 revans2 mentioned this pull request Aug 21, 2023
3 tasks
@revans2
Copy link
Contributor Author

revans2 commented Aug 22, 2023

/merge

@rapids-bot rapids-bot bot merged commit 595308b into rapidsai:branch-23.10 Aug 22, 2023
@revans2 revans2 deleted the copy_to_host_size branch August 22, 2023 13:02
@vyasr vyasr added the 4 - Needs Review Waiting for reviewer to review or respond label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team 4 - Needs Review Waiting for reviewer to review or respond improvement Improvement / enhancement to an existing function Java Affects Java cuDF API. non-breaking Non-breaking change Spark Functionality that helps Spark RAPIDS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants