Skip to content

[JNI] Adds HostColumnVector.EventHandler for spillability checks - #13898

Merged
rapids-bot[bot] merged 8 commits into
NVIDIA:branch-23.10from
abellina:add_host_column_event_handler
Aug 18, 2023
Merged

[JNI] Adds HostColumnVector.EventHandler for spillability checks#13898
rapids-bot[bot] merged 8 commits into
NVIDIA:branch-23.10from
abellina:add_host_column_event_handler

Conversation

@abellina

@abellina abellina commented Aug 17, 2023

Copy link
Copy Markdown
Contributor

This change adds the exact same API for event handling that was added to the device-side ColumnVector here #13279. We are going to need this to make HostColumnVector, or a batch of them, spillable in this spark-rapids feature: NVIDIA/cudf-spark#8882.

Signed-off-by: Alessandro Bellina <abellina@nvidia.com>
@abellina abellina added the non-breaking Non-breaking change label Aug 17, 2023
@github-actions github-actions Bot added the Java Affects Java cuDF API. label Aug 17, 2023
@abellina abellina added Spark Functionality that helps Spark RAPIDS improvement Improvement / enhancement to an existing function labels Aug 17, 2023
@abellina abellina changed the title Adds HostColumnVector.EventHandler for spillability checks [JNI] Adds HostColumnVector.EventHandler for spillability checks Aug 17, 2023
@abellina
abellina marked this pull request as ready for review August 17, 2023 16:36
@abellina
abellina requested a review from a team as a code owner August 17, 2023 16:36
@abellina

Copy link
Copy Markdown
Contributor Author

Tests pass for me locally. I am seeing a CI failure related to a missing nvtx3 header, but I wasn't upmerged. Trying again:

     [exec] /opt/conda/envs/test/include/cudf/detail/nvtx/nvtx3.hpp:33:10: fatal error: nvtx3/nvToolsExt.h: No such file or directory

@abellina

Copy link
Copy Markdown
Contributor Author

Failed again, cuDF jni isn't compiling in CI, but it runs fine locally :( It seems the nvToolsExt header is no longer available in the conda environment...?

Comment on lines +53 to +55
* @param cv - a reference to the HostColumnVector we are closing
* @param refCount - the updated ref count for this HostColumnVector at
* the time of invocation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param cv - a reference to the HostColumnVector we are closing
* @param refCount - the updated ref count for this HostColumnVector at
* the time of invocation
* @param cv Reference to the HostColumnVector we are closing
* @param refCount The updated ref count for this HostColumnVector at
* the time of invocation

* `onClosed` is invoked with the updated `refCount` during `close`.
* The last invocation of `onClosed` will be with `refCount=0`.
*
* @note the callback is invoked with this `HostColumnVector`'s lock held.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @note the callback is invoked with this `HostColumnVector`'s lock held.
* @note The callback is invoked with this `HostColumnVector`'s lock held.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We tend to favor starting with lowercase and we also favor indenting the description so that it reads as one block, but I do think the hyphen is discouraged. How about a compromise? (a0944ee)

@ttnghia ttnghia Aug 17, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not very important since we are not using the generated docds. But if we are the users who read the generated docs, we will see they are ugly with bad style: Sentences start without first letter being Cap.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and sentences starting without cap. letter is not good IMO.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since our code styles on this are all over the place, I am going to suggest filing a follow on if you feel strongly about it. We should then in that issue fix all the comments and make sure that the pre commit hooks exercise them, so we have something consistent and easy to test.

@abellina
abellina requested a review from a team as a code owner August 17, 2023 18:01
@abellina

Copy link
Copy Markdown
Contributor Author

I am trying a suggestion from @robertmaynard here 6fb3f1b to get the conda environment setup for the java test run with cuda 12, which is the one that is failing because the nvtx header we need is in a different conda package now.

@gerashegalov gerashegalov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@revans2 revans2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, just curious about the deps.

Comment thread dependencies.yaml Outdated
@abellina

Copy link
Copy Markdown
Contributor Author

@robertmaynard that worked! thanks! Also I do need an approval from ops-codeowners

@abellina

Copy link
Copy Markdown
Contributor Author

@raydouglass would you mind taking a look at this from the ops-codeowner perspective? The change that prompted this review request was: 6fb3f1b

@abellina

Copy link
Copy Markdown
Contributor Author

@abellina
abellina removed the request for review from a team August 17, 2023 21:47
@abellina

Copy link
Copy Markdown
Contributor Author

Removed ops-codeowners because this patch no longer has diffs in dependencies.yaml, it's all java files.

@abellina

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit fb0277e into NVIDIA:branch-23.10 Aug 18, 2023
@abellina
abellina deleted the add_host_column_event_handler branch August 18, 2023 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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