diff --git a/cpp/src/utilities/host_memory.cpp b/cpp/src/utilities/host_memory.cpp index 4196523d211..338dc331d6c 100644 --- a/cpp/src/utilities/host_memory.cpp +++ b/cpp/src/utilities/host_memory.cpp @@ -14,6 +14,8 @@ * limitations under the License. */ +#include "io/utilities/getenv_or.hpp" + #include #include #include @@ -277,7 +279,7 @@ bool config_default_pinned_memory_resource(pinned_mr_options const& opts) CUDF_EXPORT auto& kernel_pinned_copy_threshold() { // use cudaMemcpyAsync for all pinned copies - static std::atomic threshold = 0; + static std::atomic threshold = getenv_or("LIBCUDF_KERNEL_PINNED_COPY_THRESHOLD", 0); return threshold; } @@ -291,7 +293,7 @@ size_t get_kernel_pinned_copy_threshold() { return kernel_pinned_copy_threshold( CUDF_EXPORT auto& allocate_host_as_pinned_threshold() { // use pageable memory for all host allocations - static std::atomic threshold = 0; + static std::atomic threshold = getenv_or("LIBCUDF_ALLOCATE_HOST_AS_PINNED_THRESHOLD", 0); return threshold; }