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] Expose java API for cudf::io::config_host_memory_resource #15745

Merged

Conversation

abellina
Copy link
Contributor

This PR depends on #15665 and so it won't build until that PR merges.

Adds support for cudf::io::config_host_memory_resource which is being worked on in #15665. In 24.06 we are going to disable the cuDF pinned pool and look into this more in 24.08.

We currently have a pinned pooled resource that has been setup to share pinned memory with other APIs we use from java, so we wanted to prevent extra pinned memory being created by default, and @vuule has added an API for us to call to accomplish this.

@abellina abellina requested a review from a team as a code owner May 14, 2024 19:08
Copy link

copy-pr-bot bot commented May 14, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added the cuDF (Java) Affects Java cuDF API. label May 14, 2024
@abellina abellina added 5 - DO NOT MERGE Hold off on merging; see PR for details non-breaking Non-breaking change improvement Improvement / enhancement to an existing function cuDF (Java) Affects Java cuDF API. Spark Functionality that helps Spark RAPIDS and removed cuDF (Java) Affects Java cuDF API. labels May 14, 2024
* Sets the size of the cuDF default pinned pool.
*
* @note This has to be called before cuDF functions are executed.
* @param size
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 size
* @param size ???

* Sets the size of the cuDF default pinned pool.
*
* @note This has to be called before cuDF functions are executed.
* @param size
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 size
* @param size ???

Comment on lines 1114 to 1117
cudf::io::config_host_memory_resource(size);
try {
cudf::jni::auto_set_device(env);
cudf::io::config_host_memory_resource(size);
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate calls?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice catch, this was a copy and paste error

@abellina
Copy link
Contributor Author

@ttnghia I made changes and also note that @vuule's PR is getting closer to get merged. Mind taking another look when you get a chance?

@@ -1106,4 +1106,15 @@ JNIEXPORT void JNICALL Java_ai_rapids_cudf_Rmm_freeFromFallbackPinnedPool(JNIEnv
}
CATCH_STD(env, )
}

JNIEXPORT void JNICALL Java_ai_rapids_cudf_Rmm_configureDefaultCudfPinnedPoolSize(JNIEnv* env,
jclass clazz,
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove name of the unused var to avoid compile warning.

Suggested change
jclass clazz,
jclass,

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 have this in every single API in this file and probably other, but I am not seeing warnings on it. I'd rather keep it as is at this stage.

@abellina abellina removed the 5 - DO NOT MERGE Hold off on merging; see PR for details label May 20, 2024
@abellina
Copy link
Contributor Author

/ok to test

@galipremsagar
Copy link
Contributor

/okay to test

@abellina
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 8b72455 into rapidsai:branch-24.06 May 21, 2024
70 checks passed
abellina added a commit to abellina/cudf that referenced this pull request May 22, 2024
abellina added a commit to abellina/cudf that referenced this pull request May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuDF (Java) Affects Java cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Spark Functionality that helps Spark RAPIDS
Projects
Status: Done
Status: Landed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants