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

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

Merged

Conversation

abellina
Copy link
Contributor

@abellina abellina commented Aug 17, 2023

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/spark-rapids#8882.

@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
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
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
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
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
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)

Copy link
Contributor

@ttnghia ttnghia Aug 17, 2023

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
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
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
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.

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

Copy link
Contributor

@revans2 revans2 left a comment

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.

dependencies.yaml Outdated Show resolved Hide resolved
@abellina
Copy link
Contributor Author

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

@abellina
Copy link
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
Contributor Author

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

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

@abellina
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit fb0277e into rapidsai:branch-23.10 Aug 18, 2023
54 checks passed
@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
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants