-
Notifications
You must be signed in to change notification settings - Fork 928
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JNI] Add setKernelPinnedCopyThreshold and setPinnedAllocationThresho…
…ld (#16288) In 24.08 two new cuDF methods are being added, and the second method is still in flight (see: #16206): ``` cudf::set_kernel_pinned_copy_threshold cudf::set_allocate_host_as_pinned_threshold ``` We'd like to expose these methods in our JNI layer. I created a Cudf.java with the two static methods, and put the definitions in CudfJni.cpp. Marked as draft since I need #16206 to merge, and we are still testing it. Authors: - Alessandro Bellina (https://github.com/abellina) - Nghia Truong (https://github.com/ttnghia) Approvers: - Robert (Bobby) Evans (https://github.com/revans2) - Jason Lowe (https://github.com/jlowe) URL: #16288
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2024, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package ai.rapids.cudf; | ||
|
||
public class Cudf { | ||
|
||
static { | ||
NativeDepsLoader.loadNativeDeps(); | ||
} | ||
|
||
/** | ||
* cuDF copies that are smaller than the threshold will use a kernel to copy, instead | ||
* of cudaMemcpyAsync. | ||
*/ | ||
public static native void setKernelPinnedCopyThreshold(long kernelPinnedCopyThreshold); | ||
|
||
/** | ||
* cudf allocations that are smaller than the threshold will use the pinned host | ||
* memory resource. | ||
*/ | ||
public static native void setPinnedAllocationThreshold(long pinnedAllocationThreshold); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters