-
Notifications
You must be signed in to change notification settings - Fork 916
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
35 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
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
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,16 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
from libcpp cimport bool | ||
from libcpp.string cimport string | ||
|
||
from cudf._lib.pylibcudf.libcudf cimport experimental as cpp_experimental | ||
|
||
|
||
cpdef enable_prefetching(str key): | ||
# helper to convert a gather map to a Column | ||
cdef string c_key = key.encode("utf-8") | ||
cpp_experimental.enable_prefetching(c_key) | ||
|
||
cpdef prefetch_debugging(bool enable): | ||
# helper to convert a gather map to a Column | ||
cpp_experimental.prefetch_debugging(enable) |
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,15 @@ | ||
# Copyright (c) 2022-2024, NVIDIA CORPORATION. | ||
|
||
from libcpp cimport bool | ||
from libcpp.string cimport string | ||
|
||
|
||
cdef extern from "cudf/utilities/prefetch.hpp" \ | ||
namespace "cudf::experimental::prefetch" nogil: | ||
# Not technically the right signature, but it's good enough to let Cython | ||
# generate valid C++ code. It just means we'll be copying a host string | ||
# extra, but that's OK. If we care we could generate string_view bindings, | ||
# but there's no real rush so if we go that route we might as well | ||
# contribute them upstream to Cython itself. | ||
void enable_prefetching(string key) | ||
void prefetch_debugging(bool enable) |