From 92f0197197df9e1defbd49903d0b3c25b071d805 Mon Sep 17 00:00:00 2001 From: Vukasin Milovanovic Date: Mon, 9 Sep 2024 16:16:17 -0700 Subject: [PATCH 1/4] Simplify the nvCOMP adapter (#16762) This PR removes the adapter code that allow running with older nvCOMP versions. Feature status checking has been significantly simplified, and compile-time checks for newer compression types have been removed. Also removed the fallback to the old version of get_temp_size, since we are now guaranteed to have access to the extended version. Authors: - Vukasin Milovanovic (https://github.com/vuule) Approvers: - Bradley Dice (https://github.com/bdice) - Nghia Truong (https://github.com/ttnghia) - MithunR (https://github.com/mythrocks) URL: https://github.com/rapidsai/cudf/pull/16762 --- cpp/include/cudf/io/nvcomp_adapter.hpp | 24 +- cpp/src/io/comp/nvcomp_adapter.cpp | 334 +++------------------ cpp/src/io/comp/nvcomp_adapter.hpp | 14 +- cpp/src/io/orc/writer_impl.cu | 8 +- cpp/src/io/parquet/writer_impl_helpers.cpp | 2 +- cpp/tests/io/comp/decomp_test.cpp | 46 ++- 6 files changed, 79 insertions(+), 349 deletions(-) diff --git a/cpp/include/cudf/io/nvcomp_adapter.hpp b/cpp/include/cudf/io/nvcomp_adapter.hpp index f3260d0cb53..e7fe3cc7214 100644 --- a/cpp/include/cudf/io/nvcomp_adapter.hpp +++ b/cpp/include/cudf/io/nvcomp_adapter.hpp @@ -36,33 +36,20 @@ struct feature_status_parameters { int lib_patch_version; ///< patch version bool are_all_integrations_enabled; ///< all integrations bool are_stable_integrations_enabled; ///< stable integrations - int compute_capability_major; ///< cuda compute major version /** - * @brief Default Constructor + * @brief Default constructor using the current version of nvcomp and current environment + * variables */ feature_status_parameters(); /** - * @brief feature_status_parameters Constructor + * @brief Constructor using the current version of nvcomp * - * @param major positive integer representing major value of nvcomp - * @param minor positive integer representing minor value of nvcomp - * @param patch positive integer representing patch value of nvcomp * @param all_enabled if all integrations are enabled * @param stable_enabled if stable integrations are enabled - * @param cc_major CUDA compute capability */ - feature_status_parameters( - int major, int minor, int patch, bool all_enabled, bool stable_enabled, int cc_major) - : lib_major_version{major}, - lib_minor_version{minor}, - lib_patch_version{patch}, - are_all_integrations_enabled{all_enabled}, - are_stable_integrations_enabled{stable_enabled}, - compute_capability_major{cc_major} - { - } + feature_status_parameters(bool all_enabled, bool stable_enabled); }; /** @@ -74,8 +61,7 @@ inline bool operator==(feature_status_parameters const& lhs, feature_status_para lhs.lib_minor_version == rhs.lib_minor_version and lhs.lib_patch_version == rhs.lib_patch_version and lhs.are_all_integrations_enabled == rhs.are_all_integrations_enabled and - lhs.are_stable_integrations_enabled == rhs.are_stable_integrations_enabled and - lhs.compute_capability_major == rhs.compute_capability_major; + lhs.are_stable_integrations_enabled == rhs.are_stable_integrations_enabled; } /** diff --git a/cpp/src/io/comp/nvcomp_adapter.cpp b/cpp/src/io/comp/nvcomp_adapter.cpp index 5d0c6a8c83b..261a8eb401d 100644 --- a/cpp/src/io/comp/nvcomp_adapter.cpp +++ b/cpp/src/io/comp/nvcomp_adapter.cpp @@ -22,95 +22,44 @@ #include #include +#include #include #include +#include #include -#define NVCOMP_DEFLATE_HEADER -#if __has_include(NVCOMP_DEFLATE_HEADER) -#include NVCOMP_DEFLATE_HEADER -#endif - -#define NVCOMP_ZSTD_HEADER -#if __has_include(NVCOMP_ZSTD_HEADER) -#include NVCOMP_ZSTD_HEADER -#endif - -// When building with nvcomp 4.0 or newer, map the new version macros to the old ones -#ifndef NVCOMP_MAJOR_VERSION -#define NVCOMP_MAJOR_VERSION NVCOMP_VER_MAJOR -#define NVCOMP_MINOR_VERSION NVCOMP_VER_MINOR -#define NVCOMP_PATCH_VERSION NVCOMP_VER_PATCH -#endif - -#define NVCOMP_HAS_ZSTD_DECOMP(MAJOR, MINOR, PATCH) (MAJOR > 2 or (MAJOR == 2 and MINOR >= 3)) - -#define NVCOMP_HAS_ZSTD_COMP(MAJOR, MINOR, PATCH) (MAJOR > 2 or (MAJOR == 2 and MINOR >= 4)) - -#define NVCOMP_HAS_DEFLATE(MAJOR, MINOR, PATCH) (MAJOR > 2 or (MAJOR == 2 and MINOR >= 5)) - -#define NVCOMP_HAS_DECOMP_TEMPSIZE_EX(MAJOR, MINOR, PATCH) \ - (MAJOR > 2 or (MAJOR == 2 and MINOR > 3) or (MAJOR == 2 and MINOR == 3 and PATCH >= 1)) - -#define NVCOMP_HAS_COMP_TEMPSIZE_EX(MAJOR, MINOR, PATCH) (MAJOR > 2 or (MAJOR == 2 and MINOR >= 6)) - -// ZSTD is stable for nvcomp 2.3.2 or newer -#define NVCOMP_ZSTD_DECOMP_IS_STABLE(MAJOR, MINOR, PATCH) \ - (MAJOR > 2 or (MAJOR == 2 and MINOR > 3) or (MAJOR == 2 and MINOR == 3 and PATCH >= 2)) - namespace cudf::io::nvcomp { // Dispatcher for nvcompBatchedDecompressGetTempSizeEx template -std::optional batched_decompress_get_temp_size_ex(compression_type compression, - Args&&... args) +auto batched_decompress_get_temp_size_ex(compression_type compression, Args&&... args) { -#if NVCOMP_HAS_DECOMP_TEMPSIZE_EX(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) switch (compression) { case compression_type::SNAPPY: return nvcompBatchedSnappyDecompressGetTempSizeEx(std::forward(args)...); case compression_type::ZSTD: -#if NVCOMP_HAS_ZSTD_DECOMP(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) return nvcompBatchedZstdDecompressGetTempSizeEx(std::forward(args)...); -#else - return std::nullopt; -#endif case compression_type::LZ4: return nvcompBatchedLZ4DecompressGetTempSizeEx(std::forward(args)...); - case compression_type::DEFLATE: [[fallthrough]]; - default: return std::nullopt; - } -#endif - return std::nullopt; -} - -// Dispatcher for nvcompBatchedDecompressGetTempSize -template -auto batched_decompress_get_temp_size(compression_type compression, Args&&... args) -{ - switch (compression) { - case compression_type::SNAPPY: - return nvcompBatchedSnappyDecompressGetTempSize(std::forward(args)...); - case compression_type::ZSTD: -#if NVCOMP_HAS_ZSTD_DECOMP(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) - return nvcompBatchedZstdDecompressGetTempSize(std::forward(args)...); -#else - CUDF_FAIL("Decompression error: " + - nvcomp::is_decompression_disabled(nvcomp::compression_type::ZSTD).value()); -#endif case compression_type::DEFLATE: -#if NVCOMP_HAS_DEFLATE(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) - return nvcompBatchedDeflateDecompressGetTempSize(std::forward(args)...); -#else - CUDF_FAIL("Decompression error: " + - nvcomp::is_decompression_disabled(nvcomp::compression_type::DEFLATE).value()); -#endif - case compression_type::LZ4: - return nvcompBatchedLZ4DecompressGetTempSize(std::forward(args)...); + return nvcompBatchedDeflateDecompressGetTempSizeEx(std::forward(args)...); default: CUDF_FAIL("Unsupported compression type"); } } +size_t batched_decompress_temp_size(compression_type compression, + size_t num_chunks, + size_t max_uncomp_chunk_size, + size_t max_total_uncomp_size) +{ + size_t temp_size = 0; + nvcompStatus_t nvcomp_status = batched_decompress_get_temp_size_ex( + compression, num_chunks, max_uncomp_chunk_size, &temp_size, max_total_uncomp_size); + + CUDF_EXPECTS(nvcomp_status == nvcompStatus_t::nvcompSuccess, + "Unable to get scratch size for decompression"); + return temp_size; +} // Dispatcher for nvcompBatchedDecompressAsync template @@ -120,19 +69,9 @@ auto batched_decompress_async(compression_type compression, Args&&... args) case compression_type::SNAPPY: return nvcompBatchedSnappyDecompressAsync(std::forward(args)...); case compression_type::ZSTD: -#if NVCOMP_HAS_ZSTD_DECOMP(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) return nvcompBatchedZstdDecompressAsync(std::forward(args)...); -#else - CUDF_FAIL("Decompression error: " + - nvcomp::is_decompression_disabled(nvcomp::compression_type::ZSTD).value()); -#endif case compression_type::DEFLATE: -#if NVCOMP_HAS_DEFLATE(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) return nvcompBatchedDeflateDecompressAsync(std::forward(args)...); -#else - CUDF_FAIL("Decompression error: " + - nvcomp::is_decompression_disabled(nvcomp::compression_type::DEFLATE).value()); -#endif case compression_type::LZ4: return nvcompBatchedLZ4DecompressAsync(std::forward(args)...); default: CUDF_FAIL("Unsupported compression type"); } @@ -149,27 +88,6 @@ std::string compression_type_name(compression_type compression) return "compression_type(" + std::to_string(static_cast(compression)) + ")"; } -size_t batched_decompress_temp_size(compression_type compression, - size_t num_chunks, - size_t max_uncomp_chunk_size, - size_t max_total_uncomp_size) -{ - size_t temp_size = 0; - auto nvcomp_status = batched_decompress_get_temp_size_ex( - compression, num_chunks, max_uncomp_chunk_size, &temp_size, max_total_uncomp_size); - - if (nvcomp_status.value_or(nvcompStatus_t::nvcompErrorInternal) != - nvcompStatus_t::nvcompSuccess) { - nvcomp_status = - batched_decompress_get_temp_size(compression, num_chunks, max_uncomp_chunk_size, &temp_size); - } - - CUDF_EXPECTS(nvcomp_status == nvcompStatus_t::nvcompSuccess, - "Unable to get scratch size for decompression"); - - return temp_size; -} - void batched_decompress(compression_type compression, device_span const> inputs, device_span const> outputs, @@ -204,54 +122,10 @@ void batched_decompress(compression_type compression, update_compression_results(nvcomp_statuses, actual_uncompressed_data_sizes, results, stream); } -// Wrapper for nvcompBatchedCompressGetTempSize -auto batched_compress_get_temp_size(compression_type compression, - size_t batch_size, - size_t max_uncompressed_chunk_bytes) -{ - size_t temp_size = 0; - nvcompStatus_t nvcomp_status = nvcompStatus_t::nvcompSuccess; - switch (compression) { - case compression_type::SNAPPY: - nvcomp_status = nvcompBatchedSnappyCompressGetTempSize( - batch_size, max_uncompressed_chunk_bytes, nvcompBatchedSnappyDefaultOpts, &temp_size); - break; - case compression_type::DEFLATE: -#if NVCOMP_HAS_DEFLATE(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) - nvcomp_status = nvcompBatchedDeflateCompressGetTempSize( - batch_size, max_uncompressed_chunk_bytes, nvcompBatchedDeflateDefaultOpts, &temp_size); - break; -#else - CUDF_FAIL("Compression error: " + - nvcomp::is_compression_disabled(nvcomp::compression_type::DEFLATE).value()); -#endif - case compression_type::ZSTD: -#if NVCOMP_HAS_ZSTD_COMP(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) - nvcomp_status = nvcompBatchedZstdCompressGetTempSize( - batch_size, max_uncompressed_chunk_bytes, nvcompBatchedZstdDefaultOpts, &temp_size); - break; -#else - CUDF_FAIL("Compression error: " + - nvcomp::is_compression_disabled(nvcomp::compression_type::ZSTD).value()); -#endif - case compression_type::LZ4: - nvcomp_status = nvcompBatchedLZ4CompressGetTempSize( - batch_size, max_uncompressed_chunk_bytes, nvcompBatchedLZ4DefaultOpts, &temp_size); - break; - default: CUDF_FAIL("Unsupported compression type"); - } - - CUDF_EXPECTS(nvcomp_status == nvcompStatus_t::nvcompSuccess, - "Unable to get scratch size for compression"); - return temp_size; -} - -#if NVCOMP_HAS_COMP_TEMPSIZE_EX(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) -// Wrapper for nvcompBatchedCompressGetTempSizeEx -auto batched_compress_get_temp_size_ex(compression_type compression, - size_t batch_size, - size_t max_uncompressed_chunk_bytes, - size_t max_total_uncompressed_bytes) +size_t batched_compress_temp_size(compression_type compression, + size_t batch_size, + size_t max_uncompressed_chunk_bytes, + size_t max_total_uncompressed_bytes) { size_t temp_size = 0; nvcompStatus_t nvcomp_status = nvcompStatus_t::nvcompSuccess; @@ -291,28 +165,8 @@ auto batched_compress_get_temp_size_ex(compression_type compression, "Unable to get scratch size for compression"); return temp_size; } -#endif - -size_t batched_compress_temp_size(compression_type compression, - size_t num_chunks, - size_t max_uncomp_chunk_size, - size_t max_total_uncomp_size) -{ -#if NVCOMP_HAS_COMP_TEMPSIZE_EX(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) - try { - return batched_compress_get_temp_size_ex( - compression, num_chunks, max_uncomp_chunk_size, max_total_uncomp_size); - } catch (...) { - // Ignore errors in the expanded version; fall back to the old API in case of failure - CUDF_LOG_WARN( - "CompressGetTempSizeEx call failed, falling back to CompressGetTempSize; this may increase " - "the memory usage"); - } -#endif - - return batched_compress_get_temp_size(compression, num_chunks, max_uncomp_chunk_size); -} +// Wrapper for nvcompBatchedCompressGetMaxOutputChunkSize size_t compress_max_output_chunk_size(compression_type compression, uint32_t max_uncompressed_chunk_bytes) { @@ -328,23 +182,13 @@ size_t compress_max_output_chunk_size(compression_type compression, capped_uncomp_bytes, nvcompBatchedSnappyDefaultOpts, &max_comp_chunk_size); break; case compression_type::DEFLATE: -#if NVCOMP_HAS_DEFLATE(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) status = nvcompBatchedDeflateCompressGetMaxOutputChunkSize( capped_uncomp_bytes, nvcompBatchedDeflateDefaultOpts, &max_comp_chunk_size); break; -#else - CUDF_FAIL("Compression error: " + - nvcomp::is_compression_disabled(nvcomp::compression_type::DEFLATE).value()); -#endif case compression_type::ZSTD: -#if NVCOMP_HAS_ZSTD_COMP(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) status = nvcompBatchedZstdCompressGetMaxOutputChunkSize( capped_uncomp_bytes, nvcompBatchedZstdDefaultOpts, &max_comp_chunk_size); break; -#else - CUDF_FAIL("Compression error: " + - nvcomp::is_compression_disabled(nvcomp::compression_type::ZSTD).value()); -#endif case compression_type::LZ4: status = nvcompBatchedLZ4CompressGetMaxOutputChunkSize( capped_uncomp_bytes, nvcompBatchedLZ4DefaultOpts, &max_comp_chunk_size); @@ -384,7 +228,6 @@ static void batched_compress_async(compression_type compression, stream.value()); break; case compression_type::DEFLATE: -#if NVCOMP_HAS_DEFLATE(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) nvcomp_status = nvcompBatchedDeflateCompressAsync(device_uncompressed_ptrs, device_uncompressed_bytes, max_uncompressed_chunk_bytes, @@ -396,12 +239,7 @@ static void batched_compress_async(compression_type compression, nvcompBatchedDeflateDefaultOpts, stream.value()); break; -#else - CUDF_FAIL("Compression error: " + - nvcomp::is_compression_disabled(nvcomp::compression_type::DEFLATE).value()); -#endif case compression_type::ZSTD: -#if NVCOMP_HAS_ZSTD_COMP(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) nvcomp_status = nvcompBatchedZstdCompressAsync(device_uncompressed_ptrs, device_uncompressed_bytes, max_uncompressed_chunk_bytes, @@ -413,10 +251,6 @@ static void batched_compress_async(compression_type compression, nvcompBatchedZstdDefaultOpts, stream.value()); break; -#else - CUDF_FAIL("Compression error: " + - nvcomp::is_compression_disabled(nvcomp::compression_type::ZSTD).value()); -#endif case compression_type::LZ4: nvcomp_status = nvcompBatchedLZ4CompressAsync(device_uncompressed_ptrs, device_uncompressed_bytes, @@ -478,16 +312,18 @@ void batched_compress(compression_type compression, } feature_status_parameters::feature_status_parameters() - : lib_major_version{NVCOMP_MAJOR_VERSION}, - lib_minor_version{NVCOMP_MINOR_VERSION}, - lib_patch_version{NVCOMP_PATCH_VERSION}, - are_all_integrations_enabled{nvcomp_integration::is_all_enabled()}, - are_stable_integrations_enabled{nvcomp_integration::is_stable_enabled()} + : feature_status_parameters(nvcomp_integration::is_all_enabled(), + nvcomp_integration::is_stable_enabled()) +{ +} + +feature_status_parameters::feature_status_parameters(bool all_enabled, bool stable_enabled) + : lib_major_version{NVCOMP_VER_MAJOR}, + lib_minor_version{NVCOMP_VER_MINOR}, + lib_patch_version{NVCOMP_VER_PATCH}, + are_all_integrations_enabled{all_enabled}, + are_stable_integrations_enabled{stable_enabled} { - int device; - CUDF_CUDA_TRY(cudaGetDevice(&device)); - CUDF_CUDA_TRY( - cudaDeviceGetAttribute(&compute_capability_major, cudaDevAttrComputeCapabilityMajor, device)); } // Represents all parameters required to determine status of a compression/decompression feature @@ -510,41 +346,19 @@ std::optional is_compression_disabled_impl(compression_type compres { switch (compression) { case compression_type::DEFLATE: { - if (not NVCOMP_HAS_DEFLATE( - params.lib_major_version, params.lib_minor_version, params.lib_patch_version)) { - return "nvCOMP 2.5 or newer is required for Deflate compression"; - } if (not params.are_all_integrations_enabled) { return "DEFLATE compression is experimental, you can enable it through " "`LIBCUDF_NVCOMP_POLICY` environment variable."; } return std::nullopt; } - case compression_type::SNAPPY: { - if (not params.are_stable_integrations_enabled) { - return "Snappy compression has been disabled through the `LIBCUDF_NVCOMP_POLICY` " - "environment variable."; - } - return std::nullopt; - } - case compression_type::ZSTD: { - if (not NVCOMP_HAS_ZSTD_COMP( - params.lib_major_version, params.lib_minor_version, params.lib_patch_version)) { - return "nvCOMP 2.4 or newer is required for Zstandard compression"; - } - if (not params.are_stable_integrations_enabled) { - return "Zstandard compression is experimental, you can enable it through " - "`LIBCUDF_NVCOMP_POLICY` environment variable."; - } - return std::nullopt; - } case compression_type::LZ4: + case compression_type::SNAPPY: + case compression_type::ZSTD: if (not params.are_stable_integrations_enabled) { - return "LZ4 compression has been disabled through the `LIBCUDF_NVCOMP_POLICY` " - "environment variable."; + return "nvCOMP use is disabled through the `LIBCUDF_NVCOMP_POLICY` environment variable."; } return std::nullopt; - default: return "Unsupported compression type"; } return "Unsupported compression type"; } @@ -578,58 +392,25 @@ std::optional is_compression_disabled(compression_type compression, return reason; } -std::optional is_zstd_decomp_disabled(feature_status_parameters const& params) -{ - if (not NVCOMP_HAS_ZSTD_DECOMP( - params.lib_major_version, params.lib_minor_version, params.lib_patch_version)) { - return "nvCOMP 2.3 or newer is required for Zstandard decompression"; - } - - if (NVCOMP_ZSTD_DECOMP_IS_STABLE( - params.lib_major_version, params.lib_minor_version, params.lib_patch_version)) { - if (not params.are_stable_integrations_enabled) { - return "Zstandard decompression has been disabled through the `LIBCUDF_NVCOMP_POLICY` " - "environment variable."; - } - } else if (not params.are_all_integrations_enabled) { - return "Zstandard decompression is experimental, you can enable it through " - "`LIBCUDF_NVCOMP_POLICY` environment variable."; - } - - return std::nullopt; -} - std::optional is_decompression_disabled_impl(compression_type compression, feature_status_parameters params) { switch (compression) { case compression_type::DEFLATE: { - if (not NVCOMP_HAS_DEFLATE( - params.lib_major_version, params.lib_minor_version, params.lib_patch_version)) { - return "nvCOMP 2.5 or newer is required for Deflate decompression"; - } if (not params.are_all_integrations_enabled) { return "DEFLATE decompression is experimental, you can enable it through " "`LIBCUDF_NVCOMP_POLICY` environment variable."; } return std::nullopt; } - case compression_type::SNAPPY: { - if (not params.are_stable_integrations_enabled) { - return "Snappy decompression has been disabled through the `LIBCUDF_NVCOMP_POLICY` " - "environment variable."; - } - return std::nullopt; - } - case compression_type::ZSTD: return is_zstd_decomp_disabled(params); - case compression_type::LZ4: { + case compression_type::LZ4: + case compression_type::SNAPPY: + case compression_type::ZSTD: { if (not params.are_stable_integrations_enabled) { - return "LZ4 decompression has been disabled through the `LIBCUDF_NVCOMP_POLICY` " - "environment variable."; + return "nvCOMP use is disabled through the `LIBCUDF_NVCOMP_POLICY` environment variable."; } return std::nullopt; } - default: return "Unsupported compression type"; } return "Unsupported compression type"; } @@ -663,24 +444,13 @@ std::optional is_decompression_disabled(compression_type compressio return reason; } -size_t compress_input_alignment_bits(compression_type compression) +size_t required_alignment(compression_type compression) { switch (compression) { - case compression_type::DEFLATE: return 0; - case compression_type::SNAPPY: return 0; - case compression_type::ZSTD: return 2; - case compression_type::LZ4: return 2; - default: CUDF_FAIL("Unsupported compression type"); - } -} - -size_t compress_output_alignment_bits(compression_type compression) -{ - switch (compression) { - case compression_type::DEFLATE: return 3; - case compression_type::SNAPPY: return 0; - case compression_type::ZSTD: return 0; - case compression_type::LZ4: return 2; + case compression_type::DEFLATE: return nvcompDeflateRequiredAlignment; + case compression_type::SNAPPY: return nvcompSnappyRequiredAlignment; + case compression_type::ZSTD: return nvcompZstdRequiredAlignment; + case compression_type::LZ4: return nvcompLZ4RequiredAlignment; default: CUDF_FAIL("Unsupported compression type"); } } @@ -688,16 +458,10 @@ size_t compress_output_alignment_bits(compression_type compression) std::optional compress_max_allowed_chunk_size(compression_type compression) { switch (compression) { - case compression_type::DEFLATE: return 64 * 1024; - case compression_type::SNAPPY: return std::nullopt; - case compression_type::ZSTD: -#if NVCOMP_HAS_ZSTD_COMP(NVCOMP_MAJOR_VERSION, NVCOMP_MINOR_VERSION, NVCOMP_PATCH_VERSION) - return nvcompZstdCompressionMaxAllowedChunkSize; -#else - CUDF_FAIL("Compression error: " + - nvcomp::is_compression_disabled(nvcomp::compression_type::ZSTD).value()); -#endif - case compression_type::LZ4: return 16 * 1024 * 1024; + case compression_type::DEFLATE: return nvcompDeflateCompressionMaxAllowedChunkSize; + case compression_type::SNAPPY: return nvcompSnappyCompressionMaxAllowedChunkSize; + case compression_type::ZSTD: return nvcompZstdCompressionMaxAllowedChunkSize; + case compression_type::LZ4: return nvcompLZ4CompressionMaxAllowedChunkSize; default: return std::nullopt; } } diff --git a/cpp/src/io/comp/nvcomp_adapter.hpp b/cpp/src/io/comp/nvcomp_adapter.hpp index 43c79e32375..583bd6a3523 100644 --- a/cpp/src/io/comp/nvcomp_adapter.hpp +++ b/cpp/src/io/comp/nvcomp_adapter.hpp @@ -75,20 +75,12 @@ size_t batched_decompress_temp_size(compression_type compression, uint32_t max_uncomp_chunk_size); /** - * @brief Gets input alignment requirements for the given compression type. + * @brief Gets input and output alignment requirements for the given compression type. * * @param compression Compression type - * @returns required alignment, in bits + * @returns required alignment */ -[[nodiscard]] size_t compress_input_alignment_bits(compression_type compression); - -/** - * @brief Gets output alignment requirements for the given compression type. - * - * @param compression Compression type - * @returns required alignment, in bits - */ -[[nodiscard]] size_t compress_output_alignment_bits(compression_type compression); +[[nodiscard]] size_t required_alignment(compression_type compression); /** * @brief Maximum size of uncompressed chunks that can be compressed with nvCOMP. diff --git a/cpp/src/io/orc/writer_impl.cu b/cpp/src/io/orc/writer_impl.cu index ede9fd060b8..ebdf9f3f249 100644 --- a/cpp/src/io/orc/writer_impl.cu +++ b/cpp/src/io/orc/writer_impl.cu @@ -532,20 +532,20 @@ auto uncomp_block_alignment(CompressionKind compression_kind) { if (compression_kind == NONE or nvcomp::is_compression_disabled(to_nvcomp_compression_type(compression_kind))) { - return 1u; + return 1ul; } - return 1u << nvcomp::compress_input_alignment_bits(to_nvcomp_compression_type(compression_kind)); + return nvcomp::required_alignment(to_nvcomp_compression_type(compression_kind)); } auto comp_block_alignment(CompressionKind compression_kind) { if (compression_kind == NONE or nvcomp::is_compression_disabled(to_nvcomp_compression_type(compression_kind))) { - return 1u; + return 1ul; } - return 1u << nvcomp::compress_output_alignment_bits(to_nvcomp_compression_type(compression_kind)); + return nvcomp::required_alignment(to_nvcomp_compression_type(compression_kind)); } /** diff --git a/cpp/src/io/parquet/writer_impl_helpers.cpp b/cpp/src/io/parquet/writer_impl_helpers.cpp index e2f09f872d3..396d44c0763 100644 --- a/cpp/src/io/parquet/writer_impl_helpers.cpp +++ b/cpp/src/io/parquet/writer_impl_helpers.cpp @@ -62,7 +62,7 @@ uint32_t page_alignment(Compression codec) return 1u; } - return 1u << nvcomp::compress_input_alignment_bits(to_nvcomp_compression_type(codec)); + return nvcomp::required_alignment(to_nvcomp_compression_type(codec)); } size_t max_compression_output_size(Compression codec, uint32_t compression_blocksize) diff --git a/cpp/tests/io/comp/decomp_test.cpp b/cpp/tests/io/comp/decomp_test.cpp index 38c1a57eca9..840cf263ed9 100644 --- a/cpp/tests/io/comp/decomp_test.cpp +++ b/cpp/tests/io/comp/decomp_test.cpp @@ -176,23 +176,19 @@ TEST_F(NvcompConfigTest, Compression) using cudf::io::nvcomp::compression_type; auto const& comp_disabled = cudf::io::nvcomp::is_compression_disabled; - EXPECT_FALSE(comp_disabled(compression_type::DEFLATE, {2, 5, 0, true, true, 0})); - // version 2.5 required - EXPECT_TRUE(comp_disabled(compression_type::DEFLATE, {2, 4, 0, true, true, 0})); + EXPECT_FALSE(comp_disabled(compression_type::DEFLATE, {true, true})); // all integrations enabled required - EXPECT_TRUE(comp_disabled(compression_type::DEFLATE, {2, 5, 0, false, true, 0})); + EXPECT_TRUE(comp_disabled(compression_type::DEFLATE, {false, true})); - EXPECT_FALSE(comp_disabled(compression_type::ZSTD, {2, 4, 0, true, true, 0})); - EXPECT_FALSE(comp_disabled(compression_type::ZSTD, {2, 4, 0, false, true, 0})); - // 2.4 version required - EXPECT_TRUE(comp_disabled(compression_type::ZSTD, {2, 3, 1, false, true, 0})); + EXPECT_FALSE(comp_disabled(compression_type::ZSTD, {true, true})); + EXPECT_FALSE(comp_disabled(compression_type::ZSTD, {false, true})); // stable integrations enabled required - EXPECT_TRUE(comp_disabled(compression_type::ZSTD, {2, 4, 0, false, false, 0})); + EXPECT_TRUE(comp_disabled(compression_type::ZSTD, {false, false})); - EXPECT_FALSE(comp_disabled(compression_type::SNAPPY, {2, 5, 0, true, true, 0})); - EXPECT_FALSE(comp_disabled(compression_type::SNAPPY, {2, 4, 0, false, true, 0})); + EXPECT_FALSE(comp_disabled(compression_type::SNAPPY, {true, true})); + EXPECT_FALSE(comp_disabled(compression_type::SNAPPY, {false, true})); // stable integrations enabled required - EXPECT_TRUE(comp_disabled(compression_type::SNAPPY, {2, 3, 0, false, false, 0})); + EXPECT_TRUE(comp_disabled(compression_type::SNAPPY, {false, false})); } TEST_F(NvcompConfigTest, Decompression) @@ -200,27 +196,19 @@ TEST_F(NvcompConfigTest, Decompression) using cudf::io::nvcomp::compression_type; auto const& decomp_disabled = cudf::io::nvcomp::is_decompression_disabled; - EXPECT_FALSE(decomp_disabled(compression_type::DEFLATE, {2, 5, 0, true, true, 7})); - // version 2.5 required - EXPECT_TRUE(decomp_disabled(compression_type::DEFLATE, {2, 4, 0, true, true, 7})); + EXPECT_FALSE(decomp_disabled(compression_type::DEFLATE, {true, true})); // all integrations enabled required - EXPECT_TRUE(decomp_disabled(compression_type::DEFLATE, {2, 5, 0, false, true, 7})); - - EXPECT_FALSE(decomp_disabled(compression_type::ZSTD, {2, 4, 0, true, true, 7})); - EXPECT_FALSE(decomp_disabled(compression_type::ZSTD, {2, 3, 2, false, true, 6})); - EXPECT_FALSE(decomp_disabled(compression_type::ZSTD, {2, 3, 0, true, true, 6})); - // 2.3.1 and earlier requires all integrations to be enabled - EXPECT_TRUE(decomp_disabled(compression_type::ZSTD, {2, 3, 1, false, true, 7})); - // 2.3 version required - EXPECT_TRUE(decomp_disabled(compression_type::ZSTD, {2, 2, 0, true, true, 7})); + EXPECT_TRUE(decomp_disabled(compression_type::DEFLATE, {false, true})); + + EXPECT_FALSE(decomp_disabled(compression_type::ZSTD, {true, true})); + EXPECT_FALSE(decomp_disabled(compression_type::ZSTD, {false, true})); // stable integrations enabled required - EXPECT_TRUE(decomp_disabled(compression_type::ZSTD, {2, 4, 0, false, false, 7})); + EXPECT_TRUE(decomp_disabled(compression_type::ZSTD, {false, false})); - EXPECT_FALSE(decomp_disabled(compression_type::SNAPPY, {2, 4, 0, true, true, 7})); - EXPECT_FALSE(decomp_disabled(compression_type::SNAPPY, {2, 3, 0, false, true, 7})); - EXPECT_FALSE(decomp_disabled(compression_type::SNAPPY, {2, 2, 0, false, true, 7})); + EXPECT_FALSE(decomp_disabled(compression_type::SNAPPY, {true, true})); + EXPECT_FALSE(decomp_disabled(compression_type::SNAPPY, {false, true})); // stable integrations enabled required - EXPECT_TRUE(decomp_disabled(compression_type::SNAPPY, {2, 2, 0, false, false, 7})); + EXPECT_TRUE(decomp_disabled(compression_type::SNAPPY, {false, false})); } CUDF_TEST_PROGRAM_MAIN() From f21979ec3fbfb97ddab8ee465aadf8e98ad33e65 Mon Sep 17 00:00:00 2001 From: Muhammad Haseeb <14217455+mhaseeb123@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:03:37 -0700 Subject: [PATCH 2/4] Extend the Parquet writer's dictionary encoding benchmark. (#16591) This PR extends the data cardinality and run length range for the existing parquet writer's encoding benchmark. Authors: - Muhammad Haseeb (https://github.com/mhaseeb123) Approvers: - Vukasin Milovanovic (https://github.com/vuule) - Karthikeyan (https://github.com/karthikeyann) URL: https://github.com/rapidsai/cudf/pull/16591 --- cpp/benchmarks/io/parquet/parquet_writer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/benchmarks/io/parquet/parquet_writer.cpp b/cpp/benchmarks/io/parquet/parquet_writer.cpp index 46d2927a92b..256e50f0e64 100644 --- a/cpp/benchmarks/io/parquet/parquet_writer.cpp +++ b/cpp/benchmarks/io/parquet/parquet_writer.cpp @@ -202,8 +202,8 @@ NVBENCH_BENCH_TYPES(BM_parq_write_encode, NVBENCH_TYPE_AXES(d_type_list)) .set_name("parquet_write_encode") .set_type_axes_names({"data_type"}) .set_min_samples(4) - .add_int64_axis("cardinality", {0, 1000}) - .add_int64_axis("run_length", {1, 32}); + .add_int64_axis("cardinality", {0, 1000, 10'000, 100'000}) + .add_int64_axis("run_length", {1, 8, 32}); NVBENCH_BENCH_TYPES(BM_parq_write_io_compression, NVBENCH_TYPE_AXES(io_list, compression_list)) .set_name("parquet_write_io_compression") From afd3a4b4776adf738284c9f0b99e1fc2fcefeec8 Mon Sep 17 00:00:00 2001 From: Mark Harris <783069+harrism@users.noreply.github.com> Date: Tue, 10 Sep 2024 22:03:48 +1000 Subject: [PATCH 3/4] Add libcudf wrappers around current_device_resource functions. (#16679) Merge after rapidsai/rmm#1661 Creates and uses CUDF internal wrappers around RMM `current_device_resource` functions. I've marked this PR as breaking because it breaks the ABI, however the API is compatible. For reviewers, the most substantial additions are in the new file ``, and in the `DEVELOPER_GUIDE.md` and `*.rst` docs. The rest are all replacements of an include and all calls to `rmm::get_current_device_resource()` with `cudf::get_current_device_resource_ref()`. Closes #16676 Authors: - Mark Harris (https://github.com/harrism) Approvers: - Nghia Truong (https://github.com/ttnghia) - GALI PREM SAGAR (https://github.com/galipremsagar) - https://github.com/nvdbaranec - David Wendt (https://github.com/davidwendt) URL: https://github.com/rapidsai/cudf/pull/16679 --- cpp/benchmarks/common/generate_input.cu | 14 +-- .../random_column_generator.hpp | 14 +-- .../tpch_data_generator/table_helpers.cpp | 3 + .../tpch_data_generator/table_helpers.hpp | 20 +++-- .../tpch_data_generator.cpp | 3 + .../tpch_data_generator.hpp | 14 +-- cpp/benchmarks/copying/contiguous_split.cu | 5 +- cpp/benchmarks/copying/shift.cu | 5 +- cpp/benchmarks/fixture/benchmark_fixture.hpp | 13 +-- cpp/benchmarks/fixture/nvbench_fixture.hpp | 5 +- cpp/benchmarks/io/cuio_common.cpp | 4 +- cpp/benchmarks/io/json/nested_json.cpp | 5 +- .../io/orc/orc_reader_multithreaded.cpp | 3 +- .../io/parquet/parquet_reader_multithread.cpp | 3 +- cpp/benchmarks/iterator/iterator.cu | 3 +- cpp/benchmarks/join/join_common.hpp | 3 +- cpp/benchmarks/json/json.cu | 3 +- cpp/benchmarks/lists/copying/scatter_lists.cu | 3 +- cpp/benchmarks/lists/set_operations.cpp | 5 +- cpp/benchmarks/merge/merge_lists.cpp | 9 +- cpp/benchmarks/merge/merge_structs.cpp | 9 +- cpp/benchmarks/reduction/rank.cpp | 3 +- cpp/benchmarks/reduction/scan_structs.cpp | 3 +- cpp/benchmarks/search/contains_table.cpp | 7 +- cpp/benchmarks/sort/rank_lists.cpp | 3 +- cpp/benchmarks/sort/rank_structs.cpp | 3 +- cpp/benchmarks/sort/sort_lists.cpp | 8 +- cpp/benchmarks/sort/sort_structs.cpp | 6 +- .../developer_guide/DEVELOPER_GUIDE.md | 29 +++--- cpp/examples/basic/src/process_csv.cpp | 2 +- cpp/examples/interop/interop.cpp | 3 +- cpp/examples/nested_types/deduplication.cpp | 2 +- cpp/examples/parquet_io/parquet_io.cpp | 2 +- cpp/examples/strings/common.hpp | 2 +- cpp/examples/tpch/q1.cpp | 7 +- cpp/examples/tpch/q10.cpp | 5 +- cpp/examples/tpch/q5.cpp | 5 +- cpp/examples/tpch/q6.cpp | 5 +- cpp/examples/tpch/q9.cpp | 5 +- cpp/examples/tpch/utils.hpp | 3 +- .../cudf/ast/detail/expression_parser.hpp | 3 +- cpp/include/cudf/binaryop.hpp | 14 ++- cpp/include/cudf/column/column.hpp | 7 +- cpp/include/cudf/column/column_factories.hpp | 35 ++++---- cpp/include/cudf/concatenate.hpp | 10 +-- cpp/include/cudf/contiguous_split.hpp | 13 ++- cpp/include/cudf/copying.hpp | 40 ++++----- cpp/include/cudf/datetime.hpp | 44 +++++---- cpp/include/cudf/detail/binaryop.hpp | 2 +- .../detail/calendrical_month_sequence.cuh | 2 +- cpp/include/cudf/detail/concatenate.hpp | 2 +- cpp/include/cudf/detail/concatenate_masks.hpp | 2 +- cpp/include/cudf/detail/contiguous_split.hpp | 2 +- cpp/include/cudf/detail/copy.hpp | 2 +- cpp/include/cudf/detail/copy_if.cuh | 2 +- cpp/include/cudf/detail/copy_if_else.cuh | 2 +- cpp/include/cudf/detail/copy_range.cuh | 2 +- cpp/include/cudf/detail/datetime.hpp | 3 +- .../cudf/detail/distinct_hash_join.cuh | 2 +- cpp/include/cudf/detail/fill.hpp | 2 +- cpp/include/cudf/detail/gather.cuh | 6 +- cpp/include/cudf/detail/gather.hpp | 2 +- cpp/include/cudf/detail/groupby.hpp | 2 +- .../detail/groupby/group_replace_nulls.hpp | 2 +- .../cudf/detail/groupby/sort_helper.hpp | 2 +- .../cudf/detail/hash_reduce_by_row.cuh | 2 +- cpp/include/cudf/detail/interop.hpp | 2 +- cpp/include/cudf/detail/join.hpp | 2 +- cpp/include/cudf/detail/label_bins.hpp | 3 +- cpp/include/cudf/detail/merge.hpp | 2 +- cpp/include/cudf/detail/null_mask.cuh | 10 +-- cpp/include/cudf/detail/null_mask.hpp | 2 +- cpp/include/cudf/detail/quantiles.hpp | 2 +- cpp/include/cudf/detail/repeat.hpp | 2 +- cpp/include/cudf/detail/replace.hpp | 2 +- cpp/include/cudf/detail/reshape.hpp | 2 +- cpp/include/cudf/detail/rolling.hpp | 2 +- cpp/include/cudf/detail/round.hpp | 2 +- cpp/include/cudf/detail/scan.hpp | 2 +- cpp/include/cudf/detail/scatter.cuh | 4 +- cpp/include/cudf/detail/scatter.hpp | 2 +- cpp/include/cudf/detail/search.hpp | 2 +- cpp/include/cudf/detail/sequence.hpp | 6 +- .../cudf/detail/sizes_to_offsets_iterator.cuh | 2 +- cpp/include/cudf/detail/sorting.hpp | 2 +- cpp/include/cudf/detail/stream_compaction.hpp | 2 +- cpp/include/cudf/detail/structs/utilities.hpp | 2 +- cpp/include/cudf/detail/tdigest/tdigest.hpp | 2 +- cpp/include/cudf/detail/timezone.hpp | 4 +- cpp/include/cudf/detail/transform.hpp | 2 +- cpp/include/cudf/detail/transpose.hpp | 2 +- cpp/include/cudf/detail/unary.hpp | 2 +- .../cudf/detail/utilities/host_memory.hpp | 3 +- .../cudf/detail/utilities/host_vector.hpp | 8 +- .../detail/utilities/vector_factories.hpp | 2 +- cpp/include/cudf/detail/valid_if.cuh | 2 +- .../cudf/dictionary/detail/concatenate.hpp | 2 +- cpp/include/cudf/dictionary/detail/encode.hpp | 2 +- cpp/include/cudf/dictionary/detail/merge.hpp | 2 +- .../cudf/dictionary/detail/replace.hpp | 2 +- cpp/include/cudf/dictionary/detail/search.hpp | 2 +- .../cudf/dictionary/detail/update_keys.hpp | 2 +- .../cudf/dictionary/dictionary_factories.hpp | 9 +- cpp/include/cudf/dictionary/encode.hpp | 8 +- cpp/include/cudf/dictionary/search.hpp | 6 +- cpp/include/cudf/dictionary/update_keys.hpp | 14 ++- cpp/include/cudf/filling.hpp | 16 ++-- cpp/include/cudf/groupby.hpp | 15 ++-- cpp/include/cudf/hashing.hpp | 22 +++-- cpp/include/cudf/hashing/detail/hashing.hpp | 2 +- cpp/include/cudf/interop.hpp | 34 ++++--- cpp/include/cudf/io/avro.hpp | 6 +- cpp/include/cudf/io/csv.hpp | 6 +- cpp/include/cudf/io/detail/avro.hpp | 2 +- cpp/include/cudf/io/detail/batched_memset.hpp | 6 +- cpp/include/cudf/io/detail/csv.hpp | 2 +- cpp/include/cudf/io/detail/json.hpp | 2 +- cpp/include/cudf/io/detail/orc.hpp | 2 +- cpp/include/cudf/io/detail/parquet.hpp | 3 +- cpp/include/cudf/io/detail/tokenize_json.hpp | 2 +- cpp/include/cudf/io/json.hpp | 6 +- cpp/include/cudf/io/orc.hpp | 12 ++- cpp/include/cudf/io/parquet.hpp | 10 +-- cpp/include/cudf/io/text/detail/trie.hpp | 1 - cpp/include/cudf/io/text/multibyte_split.hpp | 5 +- cpp/include/cudf/join.hpp | 59 ++++++------ cpp/include/cudf/json/json.hpp | 6 +- cpp/include/cudf/labeling/label_bins.hpp | 5 +- cpp/include/cudf/lists/combine.hpp | 8 +- cpp/include/cudf/lists/contains.hpp | 14 ++- cpp/include/cudf/lists/count_elements.hpp | 6 +- cpp/include/cudf/lists/detail/combine.hpp | 3 +- cpp/include/cudf/lists/detail/concatenate.hpp | 2 +- cpp/include/cudf/lists/detail/contains.hpp | 3 +- cpp/include/cudf/lists/detail/copying.hpp | 2 +- cpp/include/cudf/lists/detail/extract.hpp | 3 +- cpp/include/cudf/lists/detail/gather.cuh | 2 +- .../cudf/lists/detail/interleave_columns.hpp | 2 +- .../lists/detail/lists_column_factories.hpp | 4 +- cpp/include/cudf/lists/detail/reverse.hpp | 3 +- cpp/include/cudf/lists/detail/scatter.cuh | 2 +- .../cudf/lists/detail/scatter_helper.cuh | 2 +- .../cudf/lists/detail/set_operations.hpp | 2 +- cpp/include/cudf/lists/detail/sorting.hpp | 2 +- .../cudf/lists/detail/stream_compaction.hpp | 2 +- cpp/include/cudf/lists/explode.hpp | 12 ++- cpp/include/cudf/lists/extract.hpp | 8 +- cpp/include/cudf/lists/filling.hpp | 7 +- cpp/include/cudf/lists/gather.hpp | 6 +- cpp/include/cudf/lists/reverse.hpp | 6 +- cpp/include/cudf/lists/set_operations.hpp | 10 +-- cpp/include/cudf/lists/sorting.hpp | 8 +- cpp/include/cudf/lists/stream_compaction.hpp | 7 +- cpp/include/cudf/merge.hpp | 6 +- cpp/include/cudf/null_mask.hpp | 13 ++- cpp/include/cudf/partitioning.hpp | 9 +- cpp/include/cudf/quantiles.hpp | 10 +-- cpp/include/cudf/reduction.hpp | 16 ++-- .../cudf/reduction/detail/histogram.hpp | 2 +- .../cudf/reduction/detail/reduction.cuh | 2 +- .../cudf/reduction/detail/reduction.hpp | 3 +- .../reduction/detail/reduction_functions.hpp | 2 +- .../detail/segmented_reduction_functions.hpp | 3 +- cpp/include/cudf/replace.hpp | 22 +++-- cpp/include/cudf/reshape.hpp | 10 +-- cpp/include/cudf/rolling.hpp | 24 +++-- cpp/include/cudf/round.hpp | 6 +- cpp/include/cudf/scalar/scalar.hpp | 67 +++++++------- cpp/include/cudf/scalar/scalar_factories.hpp | 27 +++--- cpp/include/cudf/search.hpp | 10 +-- cpp/include/cudf/sorting.hpp | 26 +++--- cpp/include/cudf/stream_compaction.hpp | 22 +++-- cpp/include/cudf/strings/attributes.hpp | 10 +-- cpp/include/cudf/strings/capitalize.hpp | 10 +-- cpp/include/cudf/strings/case.hpp | 10 +-- .../cudf/strings/char_types/char_types.hpp | 8 +- cpp/include/cudf/strings/combine.hpp | 14 ++- cpp/include/cudf/strings/contains.hpp | 14 ++- .../cudf/strings/convert/convert_booleans.hpp | 8 +- .../cudf/strings/convert/convert_datetime.hpp | 10 +-- .../strings/convert/convert_durations.hpp | 8 +- .../strings/convert/convert_fixed_point.hpp | 10 +-- .../cudf/strings/convert/convert_floats.hpp | 10 +-- .../cudf/strings/convert/convert_integers.hpp | 18 ++-- .../cudf/strings/convert/convert_ipv4.hpp | 10 +-- .../cudf/strings/convert/convert_lists.hpp | 6 +- .../cudf/strings/convert/convert_urls.hpp | 8 +- cpp/include/cudf/strings/detail/combine.hpp | 2 +- .../cudf/strings/detail/concatenate.hpp | 2 +- .../cudf/strings/detail/converters.hpp | 2 +- .../cudf/strings/detail/copy_if_else.cuh | 2 +- .../cudf/strings/detail/copy_range.hpp | 2 +- cpp/include/cudf/strings/detail/copying.hpp | 2 +- cpp/include/cudf/strings/detail/fill.hpp | 2 +- cpp/include/cudf/strings/detail/gather.cuh | 2 +- cpp/include/cudf/strings/detail/merge.hpp | 1 + cpp/include/cudf/strings/detail/replace.hpp | 2 +- cpp/include/cudf/strings/detail/scan.hpp | 2 +- cpp/include/cudf/strings/detail/scatter.cuh | 4 +- .../cudf/strings/detail/strings_children.cuh | 2 +- .../detail/strings_column_factories.cuh | 2 +- cpp/include/cudf/strings/detail/utilities.hpp | 2 +- cpp/include/cudf/strings/extract.hpp | 8 +- cpp/include/cudf/strings/find.hpp | 22 +++-- cpp/include/cudf/strings/find_multiple.hpp | 6 +- cpp/include/cudf/strings/findall.hpp | 6 +- cpp/include/cudf/strings/padding.hpp | 8 +- cpp/include/cudf/strings/repeat_strings.hpp | 10 +-- cpp/include/cudf/strings/replace.hpp | 10 +-- cpp/include/cudf/strings/replace_re.hpp | 10 +-- cpp/include/cudf/strings/reverse.hpp | 6 +- cpp/include/cudf/strings/slice.hpp | 8 +- cpp/include/cudf/strings/split/partition.hpp | 8 +- cpp/include/cudf/strings/split/split.hpp | 12 ++- cpp/include/cudf/strings/split/split_re.hpp | 12 ++- cpp/include/cudf/strings/strip.hpp | 6 +- cpp/include/cudf/strings/translate.hpp | 8 +- cpp/include/cudf/strings/utilities.hpp | 6 +- cpp/include/cudf/strings/wrap.hpp | 6 +- .../cudf/structs/detail/concatenate.hpp | 3 +- cpp/include/cudf/structs/detail/scan.hpp | 2 +- cpp/include/cudf/table/table.hpp | 7 +- cpp/include/cudf/timezone.hpp | 6 +- cpp/include/cudf/transform.hpp | 22 +++-- cpp/include/cudf/transpose.hpp | 6 +- cpp/include/cudf/unary.hpp | 16 ++-- .../cudf/utilities/memory_resource.hpp | 90 +++++++++++++++++++ cpp/include/cudf/utilities/pinned_memory.hpp | 3 +- cpp/include/cudf_test/base_fixture.hpp | 7 +- cpp/include/cudf_test/column_wrapper.hpp | 16 ++-- .../stream_checking_resource_adaptor.hpp | 2 +- cpp/include/cudf_test/tdigest_utilities.cuh | 20 ++--- cpp/include/cudf_test/testing_main.hpp | 8 +- cpp/include/doxygen_groups.h | 3 +- cpp/include/nvtext/byte_pair_encoding.hpp | 11 ++- cpp/include/nvtext/detail/generate_ngrams.hpp | 3 +- cpp/include/nvtext/detail/load_hash_file.hpp | 2 +- cpp/include/nvtext/detail/tokenize.hpp | 2 +- cpp/include/nvtext/edit_distance.hpp | 7 +- cpp/include/nvtext/generate_ngrams.hpp | 9 +- cpp/include/nvtext/jaccard.hpp | 5 +- cpp/include/nvtext/minhash.hpp | 11 ++- cpp/include/nvtext/ngrams_tokenize.hpp | 5 +- cpp/include/nvtext/normalize.hpp | 7 +- cpp/include/nvtext/replace.hpp | 7 +- cpp/include/nvtext/stemmer.hpp | 9 +- cpp/include/nvtext/subword_tokenize.hpp | 7 +- cpp/include/nvtext/tokenize.hpp | 21 +++-- cpp/src/binaryop/binaryop.cpp | 2 +- cpp/src/binaryop/compiled/binary_ops.cu | 4 +- cpp/src/binaryop/compiled/binary_ops.hpp | 2 +- cpp/src/bitmask/null_mask.cu | 2 +- cpp/src/column/column.cu | 2 +- cpp/src/column/column_factories.cpp | 3 +- cpp/src/column/column_factories.cu | 3 +- cpp/src/copying/concatenate.cu | 6 +- cpp/src/copying/contiguous_split.cu | 6 +- cpp/src/copying/copy.cpp | 2 +- cpp/src/copying/copy.cu | 5 +- cpp/src/copying/copy_range.cu | 6 +- cpp/src/copying/gather.cu | 2 +- cpp/src/copying/get_element.cu | 2 +- cpp/src/copying/pack.cpp | 2 +- cpp/src/copying/purge_nonempty_nulls.cu | 3 +- cpp/src/copying/reverse.cu | 3 +- cpp/src/copying/sample.cu | 2 +- cpp/src/copying/scatter.cu | 8 +- cpp/src/copying/segmented_shift.cu | 2 +- cpp/src/copying/shift.cu | 2 +- cpp/src/datetime/datetime_ops.cu | 2 +- cpp/src/datetime/timezone.cpp | 3 +- cpp/src/dictionary/add_keys.cu | 6 +- cpp/src/dictionary/decode.cu | 2 +- cpp/src/dictionary/detail/concatenate.cu | 7 +- cpp/src/dictionary/detail/merge.cu | 2 +- cpp/src/dictionary/dictionary_factories.cu | 2 +- cpp/src/dictionary/encode.cu | 2 +- cpp/src/dictionary/remove_keys.cu | 2 +- cpp/src/dictionary/replace.cu | 4 +- cpp/src/dictionary/search.cu | 2 +- cpp/src/dictionary/set_keys.cu | 4 +- cpp/src/filling/calendrical_month_sequence.cu | 2 +- cpp/src/filling/fill.cu | 5 +- cpp/src/filling/repeat.cu | 3 +- cpp/src/filling/sequence.cu | 2 +- cpp/src/groupby/common/utils.hpp | 3 +- cpp/src/groupby/groupby.cu | 7 +- cpp/src/groupby/hash/groupby.cu | 8 +- cpp/src/groupby/sort/aggregate.cpp | 6 +- cpp/src/groupby/sort/functors.hpp | 2 +- cpp/src/groupby/sort/group_argmax.cu | 2 +- cpp/src/groupby/sort/group_argmin.cu | 2 +- cpp/src/groupby/sort/group_collect.cu | 2 +- cpp/src/groupby/sort/group_correlation.cu | 2 +- cpp/src/groupby/sort/group_count.cu | 2 +- cpp/src/groupby/sort/group_count_scan.cu | 2 +- cpp/src/groupby/sort/group_histogram.cu | 2 +- cpp/src/groupby/sort/group_m2.cu | 2 +- cpp/src/groupby/sort/group_max.cu | 3 +- cpp/src/groupby/sort/group_max_scan.cu | 3 +- cpp/src/groupby/sort/group_merge_lists.cu | 2 +- cpp/src/groupby/sort/group_merge_m2.cu | 2 +- cpp/src/groupby/sort/group_min.cu | 3 +- cpp/src/groupby/sort/group_min_scan.cu | 3 +- cpp/src/groupby/sort/group_nth_element.cu | 2 +- cpp/src/groupby/sort/group_nunique.cu | 2 +- cpp/src/groupby/sort/group_product.cu | 2 +- cpp/src/groupby/sort/group_product_scan.cu | 3 +- cpp/src/groupby/sort/group_quantiles.cu | 4 +- cpp/src/groupby/sort/group_rank_scan.cu | 6 +- cpp/src/groupby/sort/group_reductions.hpp | 2 +- cpp/src/groupby/sort/group_replace_nulls.cu | 2 +- cpp/src/groupby/sort/group_scan.hpp | 2 +- cpp/src/groupby/sort/group_scan_util.cuh | 2 +- .../sort/group_single_pass_reduction_util.cuh | 2 +- cpp/src/groupby/sort/group_std.cu | 2 +- cpp/src/groupby/sort/group_sum.cu | 2 +- cpp/src/groupby/sort/group_sum_scan.cu | 3 +- cpp/src/groupby/sort/scan.cpp | 12 +-- cpp/src/groupby/sort/sort_helper.cu | 14 +-- cpp/src/hash/md5_hash.cu | 2 +- cpp/src/hash/murmurhash3_x64_128.cu | 2 +- cpp/src/hash/murmurhash3_x86_32.cu | 2 +- cpp/src/hash/sha1_hash.cu | 2 +- cpp/src/hash/sha224_hash.cu | 2 +- cpp/src/hash/sha256_hash.cu | 2 +- cpp/src/hash/sha384_hash.cu | 2 +- cpp/src/hash/sha512_hash.cu | 2 +- cpp/src/hash/sha_hash.cuh | 2 +- cpp/src/hash/xxhash_64.cu | 2 +- cpp/src/interop/arrow_utilities.cpp | 1 - cpp/src/interop/arrow_utilities.hpp | 3 +- .../interop/decimal_conversion_utilities.cuh | 2 +- cpp/src/interop/dlpack.cpp | 2 +- cpp/src/interop/from_arrow_device.cu | 2 +- cpp/src/interop/from_arrow_host.cu | 2 +- cpp/src/interop/from_arrow_stream.cu | 1 - cpp/src/interop/to_arrow_device.cu | 3 +- cpp/src/interop/to_arrow_host.cu | 3 +- cpp/src/io/avro/reader_impl.cu | 8 +- cpp/src/io/comp/uncomp.cpp | 3 +- cpp/src/io/csv/csv_gpu.cu | 3 +- cpp/src/io/csv/durations.cu | 2 +- cpp/src/io/csv/durations.hpp | 3 +- cpp/src/io/csv/reader_impl.cu | 14 +-- cpp/src/io/csv/writer_impl.cu | 13 ++- cpp/src/io/functions.cpp | 3 +- cpp/src/io/json/json_column.cu | 14 +-- cpp/src/io/json/json_normalization.cu | 2 +- cpp/src/io/json/json_tree.cu | 2 +- cpp/src/io/json/nested_json.hpp | 3 +- cpp/src/io/json/nested_json_gpu.cu | 8 +- cpp/src/io/json/read_json.cu | 10 +-- cpp/src/io/json/read_json.hpp | 2 +- cpp/src/io/json/write_json.cu | 26 +++--- cpp/src/io/orc/reader_impl.hpp | 2 +- cpp/src/io/orc/reader_impl_decode.cu | 8 +- cpp/src/io/orc/reader_impl_helpers.cpp | 2 +- cpp/src/io/orc/reader_impl_helpers.hpp | 2 +- cpp/src/io/orc/stripe_enc.cu | 3 +- cpp/src/io/orc/writer_impl.cu | 13 +-- cpp/src/io/parquet/predicate_pushdown.cpp | 6 +- cpp/src/io/parquet/reader.cpp | 2 +- cpp/src/io/parquet/reader_impl.cpp | 5 +- cpp/src/io/parquet/reader_impl.hpp | 5 +- cpp/src/io/parquet/reader_impl_chunking.cu | 15 ++-- cpp/src/io/parquet/reader_impl_preprocess.cu | 9 +- cpp/src/io/parquet/writer_impl.cu | 13 +-- cpp/src/io/text/multibyte_split.cu | 7 +- cpp/src/io/utilities/column_buffer.cpp | 6 +- cpp/src/io/utilities/column_buffer.hpp | 5 +- cpp/src/io/utilities/data_casting.cu | 2 +- cpp/src/io/utilities/output_builder.cuh | 4 +- cpp/src/io/utilities/string_parsing.hpp | 2 +- cpp/src/io/utilities/trie.cu | 5 +- cpp/src/join/conditional_join.cu | 2 +- cpp/src/join/conditional_join.hpp | 3 +- cpp/src/join/cross_join.cu | 2 +- cpp/src/join/distinct_hash_join.cu | 5 +- cpp/src/join/hash_join.cu | 4 +- cpp/src/join/join.cu | 8 +- cpp/src/join/join_common_utils.cuh | 2 +- cpp/src/join/join_utils.cu | 3 +- cpp/src/join/mixed_join.cu | 6 +- cpp/src/join/mixed_join_semi.cu | 4 +- cpp/src/join/mixed_join_size_kernel.hpp | 3 + cpp/src/join/semi_join.cu | 4 +- cpp/src/json/json_path.cu | 6 +- cpp/src/labeling/label_bins.cu | 2 +- .../combine/concatenate_list_elements.cu | 2 +- cpp/src/lists/combine/concatenate_rows.cu | 8 +- cpp/src/lists/contains.cu | 6 +- cpp/src/lists/copying/concatenate.cu | 2 +- cpp/src/lists/copying/copying.cu | 2 +- cpp/src/lists/copying/gather.cu | 2 +- cpp/src/lists/copying/scatter_helper.cu | 3 +- cpp/src/lists/copying/segmented_gather.cu | 2 +- cpp/src/lists/count_elements.cu | 2 +- cpp/src/lists/dremel.cu | 3 +- cpp/src/lists/explode.cu | 2 +- cpp/src/lists/extract.cu | 4 +- cpp/src/lists/interleave_columns.cu | 4 +- cpp/src/lists/lists_column_factories.cu | 4 +- cpp/src/lists/reverse.cu | 4 +- cpp/src/lists/segmented_sort.cu | 2 +- cpp/src/lists/sequences.cu | 2 +- cpp/src/lists/set_operations.cu | 26 +++--- .../stream_compaction/apply_boolean_mask.cu | 4 +- cpp/src/lists/stream_compaction/distinct.cu | 4 +- cpp/src/lists/utilities.cu | 3 +- cpp/src/lists/utilities.hpp | 2 +- cpp/src/merge/merge.cu | 12 +-- cpp/src/partitioning/partitioning.cu | 6 +- cpp/src/partitioning/round_robin.cu | 2 +- cpp/src/quantiles/quantile.cu | 4 +- cpp/src/quantiles/quantiles.cu | 6 +- cpp/src/quantiles/tdigest/tdigest.cu | 4 +- .../quantiles/tdigest/tdigest_aggregation.cu | 8 +- cpp/src/reductions/all.cu | 5 +- cpp/src/reductions/any.cu | 5 +- cpp/src/reductions/collect_ops.cu | 3 +- cpp/src/reductions/compound.cuh | 3 +- cpp/src/reductions/histogram.cu | 5 +- cpp/src/reductions/max.cu | 2 +- cpp/src/reductions/mean.cu | 2 +- cpp/src/reductions/min.cu | 3 +- cpp/src/reductions/minmax.cu | 2 +- .../reductions/nested_type_minmax_util.cuh | 5 +- cpp/src/reductions/nth_element.cu | 2 +- cpp/src/reductions/product.cu | 2 +- cpp/src/reductions/reductions.cpp | 6 +- cpp/src/reductions/scan/rank_scan.cu | 4 +- cpp/src/reductions/scan/scan.cpp | 3 +- cpp/src/reductions/scan/scan.cuh | 2 +- cpp/src/reductions/scan/scan_exclusive.cu | 2 +- cpp/src/reductions/scan/scan_inclusive.cu | 2 +- cpp/src/reductions/segmented/all.cu | 3 +- cpp/src/reductions/segmented/any.cu | 3 +- cpp/src/reductions/segmented/compound.cuh | 5 +- cpp/src/reductions/segmented/counts.cu | 3 +- cpp/src/reductions/segmented/counts.hpp | 2 +- cpp/src/reductions/segmented/max.cu | 3 +- cpp/src/reductions/segmented/mean.cu | 2 +- cpp/src/reductions/segmented/min.cu | 3 +- cpp/src/reductions/segmented/nunique.cu | 2 +- cpp/src/reductions/segmented/product.cu | 3 +- cpp/src/reductions/segmented/reductions.cpp | 2 +- cpp/src/reductions/segmented/simple.cuh | 4 +- cpp/src/reductions/segmented/std.cu | 2 +- cpp/src/reductions/segmented/sum.cu | 3 +- .../reductions/segmented/sum_of_squares.cu | 2 +- .../reductions/segmented/update_validity.cu | 3 +- .../reductions/segmented/update_validity.hpp | 2 +- cpp/src/reductions/segmented/var.cu | 2 +- cpp/src/reductions/simple.cuh | 4 +- cpp/src/reductions/std.cu | 2 +- cpp/src/reductions/sum.cu | 2 +- cpp/src/reductions/sum_of_squares.cu | 2 +- cpp/src/reductions/var.cu | 2 +- cpp/src/replace/clamp.cu | 4 +- cpp/src/replace/nans.cu | 2 +- cpp/src/replace/nulls.cu | 2 +- cpp/src/replace/replace.cu | 8 +- cpp/src/reshape/byte_cast.cu | 2 +- cpp/src/reshape/interleave_columns.cu | 2 +- cpp/src/reshape/tile.cu | 2 +- cpp/src/rolling/detail/lead_lag_nested.cuh | 5 +- cpp/src/rolling/detail/nth_element.cuh | 2 +- .../detail/optimized_unbounded_window.cpp | 5 +- .../detail/optimized_unbounded_window.hpp | 2 +- cpp/src/rolling/detail/rolling.cuh | 4 +- cpp/src/rolling/detail/rolling.hpp | 3 +- .../rolling/detail/rolling_collect_list.cu | 2 +- .../rolling/detail/rolling_collect_list.cuh | 2 +- .../rolling/detail/rolling_fixed_window.cu | 3 +- .../rolling/detail/rolling_variable_window.cu | 3 +- cpp/src/rolling/grouped_rolling.cu | 7 +- cpp/src/rolling/rolling.cu | 3 +- cpp/src/round/round.cu | 2 +- cpp/src/scalar/scalar.cpp | 4 +- cpp/src/scalar/scalar_factories.cpp | 2 +- cpp/src/search/contains_column.cu | 6 +- cpp/src/search/contains_scalar.cu | 3 +- cpp/src/search/contains_table.cu | 4 +- cpp/src/search/search_ordered.cu | 4 +- cpp/src/sort/rank.cu | 2 +- cpp/src/sort/segmented_sort.cu | 2 +- cpp/src/sort/segmented_sort_impl.cuh | 18 ++-- cpp/src/sort/sort.cu | 4 +- cpp/src/sort/sort_column.cu | 3 +- cpp/src/sort/sort_column_impl.cuh | 2 +- cpp/src/sort/sort_impl.cuh | 3 +- cpp/src/sort/stable_segmented_sort.cu | 3 +- cpp/src/sort/stable_sort.cu | 4 +- cpp/src/sort/stable_sort_column.cu | 3 +- .../stream_compaction/apply_boolean_mask.cu | 2 +- cpp/src/stream_compaction/distinct.cu | 5 +- cpp/src/stream_compaction/distinct_count.cu | 3 +- .../stream_compaction/distinct_helpers.hpp | 2 +- cpp/src/stream_compaction/drop_nans.cu | 2 +- cpp/src/stream_compaction/drop_nulls.cu | 2 +- cpp/src/stream_compaction/stable_distinct.cu | 5 +- cpp/src/stream_compaction/unique.cu | 2 +- cpp/src/strings/attributes.cu | 2 +- cpp/src/strings/capitalize.cu | 2 +- cpp/src/strings/case.cu | 2 +- cpp/src/strings/char_types/char_types.cu | 2 +- cpp/src/strings/combine/concatenate.cu | 2 +- cpp/src/strings/combine/join.cu | 2 +- cpp/src/strings/combine/join_list_elements.cu | 2 +- cpp/src/strings/contains.cu | 2 +- cpp/src/strings/convert/convert_booleans.cu | 2 +- cpp/src/strings/convert/convert_datetime.cu | 4 +- cpp/src/strings/convert/convert_durations.cu | 2 +- .../strings/convert/convert_fixed_point.cu | 2 +- cpp/src/strings/convert/convert_floats.cu | 2 +- cpp/src/strings/convert/convert_hex.cu | 2 +- cpp/src/strings/convert/convert_integers.cu | 2 +- cpp/src/strings/convert/convert_ipv4.cu | 2 +- cpp/src/strings/convert/convert_lists.cu | 2 +- cpp/src/strings/convert/convert_urls.cu | 2 +- cpp/src/strings/copying/concatenate.cu | 4 +- cpp/src/strings/copying/copy_range.cu | 2 +- cpp/src/strings/copying/copying.cu | 2 +- cpp/src/strings/copying/shift.cu | 2 +- cpp/src/strings/count_matches.cu | 3 +- cpp/src/strings/count_matches.hpp | 2 +- cpp/src/strings/extract/extract.cu | 2 +- cpp/src/strings/extract/extract_all.cu | 2 +- cpp/src/strings/filling/fill.cu | 2 +- cpp/src/strings/filter_chars.cu | 6 +- cpp/src/strings/like.cu | 2 +- cpp/src/strings/padding.cu | 2 +- cpp/src/strings/regex/utilities.cuh | 2 +- cpp/src/strings/repeat_strings.cu | 2 +- cpp/src/strings/replace/backref_re.cu | 4 +- cpp/src/strings/replace/find_replace.cu | 2 +- cpp/src/strings/replace/multi.cu | 8 +- cpp/src/strings/replace/multi_re.cu | 4 +- cpp/src/strings/replace/replace.cu | 4 +- cpp/src/strings/replace/replace_nulls.cu | 2 +- cpp/src/strings/replace/replace_re.cu | 2 +- cpp/src/strings/replace/replace_slice.cu | 2 +- cpp/src/strings/reverse.cu | 2 +- cpp/src/strings/scan/scan_inclusive.cu | 2 +- cpp/src/strings/search/find.cu | 2 +- cpp/src/strings/search/find_multiple.cu | 2 +- cpp/src/strings/search/findall.cu | 2 +- cpp/src/strings/slice.cu | 2 +- cpp/src/strings/split/partition.cu | 2 +- cpp/src/strings/split/split.cu | 2 +- cpp/src/strings/split/split.cuh | 2 +- cpp/src/strings/split/split_re.cu | 6 +- cpp/src/strings/split/split_record.cu | 2 +- cpp/src/strings/strings_column_factories.cu | 2 +- cpp/src/strings/strings_scalar_factories.cpp | 2 +- cpp/src/strings/strip.cu | 2 +- cpp/src/strings/translate.cu | 6 +- cpp/src/strings/utilities.cu | 2 +- cpp/src/strings/wrap.cu | 2 +- cpp/src/structs/copying/concatenate.cu | 2 +- cpp/src/structs/scan/scan_inclusive.cu | 2 +- cpp/src/structs/structs_column_factories.cu | 2 +- cpp/src/structs/utilities.cpp | 3 +- cpp/src/table/row_operators.cu | 26 +++--- cpp/src/table/table.cpp | 2 +- cpp/src/text/bpe/byte_pair_encoding.cu | 2 +- cpp/src/text/bpe/load_merge_pairs.cu | 2 +- cpp/src/text/detokenize.cu | 4 +- cpp/src/text/edit_distance.cu | 2 +- cpp/src/text/generate_ngrams.cu | 4 +- cpp/src/text/jaccard.cu | 2 +- cpp/src/text/minhash.cu | 2 +- cpp/src/text/ngrams_tokenize.cu | 8 +- cpp/src/text/normalize.cu | 2 +- cpp/src/text/replace.cu | 2 +- cpp/src/text/stemmer.cu | 2 +- cpp/src/text/subword/load_hash_file.cu | 2 +- cpp/src/text/subword/subword_tokenize.cu | 2 +- cpp/src/text/tokenize.cu | 6 +- cpp/src/text/vocabulary_tokenize.cu | 2 +- cpp/src/transform/bools_to_mask.cu | 2 +- cpp/src/transform/compute_column.cu | 2 +- cpp/src/transform/encode.cu | 2 +- cpp/src/transform/mask_to_bools.cu | 2 +- cpp/src/transform/nans_to_nulls.cu | 2 +- cpp/src/transform/one_hot_encode.cu | 2 +- cpp/src/transform/row_bit_count.cu | 4 +- cpp/src/transform/transform.cpp | 2 +- cpp/src/transpose/transpose.cu | 2 +- cpp/src/unary/cast_ops.cu | 2 +- cpp/src/unary/math_ops.cu | 4 +- cpp/src/unary/nan_ops.cu | 2 +- cpp/src/unary/null_ops.cu | 3 +- cpp/src/unary/unary_ops.cuh | 2 +- cpp/src/utilities/host_memory.cpp | 2 +- cpp/tests/bitmask/bitmask_tests.cpp | 3 +- cpp/tests/bitmask/valid_if_tests.cu | 11 +-- cpp/tests/column/column_test.cpp | 5 +- cpp/tests/copying/detail_gather_tests.cu | 9 +- cpp/tests/copying/gather_str_tests.cpp | 11 ++- cpp/tests/copying/shift_tests.cpp | 6 +- cpp/tests/copying/split_tests.cpp | 9 +- .../device_atomics/device_atomics_test.cu | 5 +- cpp/tests/dictionary/search_test.cpp | 9 +- cpp/tests/fixed_point/fixed_point_tests.cu | 7 +- cpp/tests/groupby/histogram_tests.cpp | 5 +- cpp/tests/groupby/tdigest_tests.cu | 15 ++-- cpp/tests/io/json/json_chunked_reader.cu | 6 +- .../io/json/json_quote_normalization_test.cpp | 3 +- cpp/tests/io/json/json_tree.cpp | 23 ++--- cpp/tests/io/json/json_type_cast_test.cu | 9 +- .../json_whitespace_normalization_test.cu | 5 +- cpp/tests/io/json/nested_json_test.cpp | 41 ++++----- cpp/tests/io/orc_chunked_reader_test.cu | 5 +- cpp/tests/io/parquet_chunked_reader_test.cu | 3 +- cpp/tests/io/parquet_writer_test.cpp | 3 +- cpp/tests/io/type_inference_test.cu | 29 +++--- cpp/tests/iterator/iterator_tests.cuh | 3 +- cpp/tests/iterator/value_iterator_test.cuh | 5 +- .../iterator/value_iterator_test_strings.cu | 11 +-- cpp/tests/join/distinct_join_tests.cpp | 3 +- cpp/tests/join/join_tests.cpp | 7 +- cpp/tests/join/semi_anti_join_tests.cpp | 5 +- cpp/tests/large_strings/json_tests.cu | 3 +- .../large_strings/large_strings_fixture.cpp | 2 +- .../partitioning/hash_partition_test.cpp | 3 +- .../quantiles/percentile_approx_test.cpp | 3 +- .../reductions/segmented_reduction_tests.cpp | 71 +++++++-------- cpp/tests/scalar/scalar_device_view_test.cu | 3 +- cpp/tests/sort/segmented_sort_tests.cpp | 3 +- cpp/tests/streams/reduction_test.cpp | 5 +- cpp/tests/strings/contains_tests.cpp | 5 +- cpp/tests/strings/factories_test.cu | 11 +-- cpp/tests/strings/integers_tests.cpp | 3 +- cpp/tests/structs/utilities_tests.cpp | 39 ++++---- cpp/tests/table/table_view_tests.cu | 5 +- cpp/tests/types/type_dispatcher_test.cu | 5 +- cpp/tests/utilities/tdigest_utilities.cu | 7 +- .../utilities_tests/batched_memset_tests.cu | 3 +- .../utilities_tests/pinned_memory_tests.cpp | 1 - cpp/tests/utilities_tests/span_tests.cu | 3 +- .../source/libcudf_docs/api_docs/index.rst | 1 + .../libcudf_docs/api_docs/memory_resource.rst | 5 ++ .../main/native/include/maps_column_view.hpp | 11 ++- java/src/main/native/src/ColumnVectorJni.cpp | 5 +- java/src/main/native/src/ColumnViewJni.cu | 10 +-- java/src/main/native/src/RmmJni.cpp | 9 +- java/src/main/native/src/TableJni.cpp | 5 +- java/src/main/native/src/maps_column_view.cu | 6 +- .../strings/src/strings/udf/udf_apis.cu | 3 +- .../pylibcudf/pylibcudf/libcudf/interop.pxd | 4 +- 652 files changed, 1771 insertions(+), 1824 deletions(-) create mode 100644 cpp/include/cudf/utilities/memory_resource.hpp create mode 100644 docs/cudf/source/libcudf_docs/api_docs/memory_resource.rst diff --git a/cpp/benchmarks/common/generate_input.cu b/cpp/benchmarks/common/generate_input.cu index 0970003deb2..dc258e32dc5 100644 --- a/cpp/benchmarks/common/generate_input.cu +++ b/cpp/benchmarks/common/generate_input.cu @@ -28,10 +28,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -507,7 +507,7 @@ std::unique_ptr create_random_column(data_profile const& profile, null_mask.end(), thrust::identity{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return std::make_unique( dtype, @@ -591,7 +591,7 @@ std::unique_ptr create_random_utf8_string_column(data_profile cons null_mask.end() - 1, thrust::identity{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return cudf::make_strings_column( num_rows, std::make_unique(std::move(offsets), rmm::device_buffer{}, 0), @@ -626,7 +626,7 @@ std::unique_ptr create_random_column(data_profi cudf::out_of_bounds_policy::DONT_CHECK, cudf::detail::negative_index_policy::NOT_ALLOWED, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return std::move(str_table->release()[0]); } @@ -688,7 +688,7 @@ std::unique_ptr create_random_column(data_profi valids.end(), thrust::identity{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); } return std::pair{}; }(); @@ -782,7 +782,7 @@ std::unique_ptr create_random_column(data_profile valids.end(), thrust::identity{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); list_column = cudf::make_lists_column( current_num_rows, std::move(offsets_column), @@ -933,7 +933,7 @@ std::pair create_random_null_mask( thrust::make_counting_iterator(size), bool_generator{seed, 1.0 - *null_probability}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); } } diff --git a/cpp/benchmarks/common/tpch_data_generator/random_column_generator.hpp b/cpp/benchmarks/common/tpch_data_generator/random_column_generator.hpp index 3e254f49805..0bf1eee4e85 100644 --- a/cpp/benchmarks/common/tpch_data_generator/random_column_generator.hpp +++ b/cpp/benchmarks/common/tpch_data_generator/random_column_generator.hpp @@ -17,6 +17,8 @@ #pragma once #include +#include +#include #include @@ -36,7 +38,7 @@ std::unique_ptr generate_random_string_column( cudf::size_type upper, cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate a column of random numbers @@ -61,7 +63,7 @@ std::unique_ptr generate_random_numeric_column( T upper, cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate a primary key column @@ -81,7 +83,7 @@ std::unique_ptr generate_primary_key_column( cudf::scalar const& start, cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate a column where all the rows have the same string value @@ -101,7 +103,7 @@ std::unique_ptr generate_repeat_string_column( std::string const& value, cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate a column by randomly choosing from set of strings @@ -121,7 +123,7 @@ std::unique_ptr generate_random_string_column_from_set( cudf::host_span set, cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate a column consisting of a repeating sequence of integers @@ -145,6 +147,6 @@ std::unique_ptr generate_repeat_sequence_column( bool zero_indexed, cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); } // namespace cudf::datagen diff --git a/cpp/benchmarks/common/tpch_data_generator/table_helpers.cpp b/cpp/benchmarks/common/tpch_data_generator/table_helpers.cpp index 36bf9c49cea..d4368906702 100644 --- a/cpp/benchmarks/common/tpch_data_generator/table_helpers.cpp +++ b/cpp/benchmarks/common/tpch_data_generator/table_helpers.cpp @@ -35,6 +35,9 @@ #include #include +#include +#include + #include namespace cudf::datagen { diff --git a/cpp/benchmarks/common/tpch_data_generator/table_helpers.hpp b/cpp/benchmarks/common/tpch_data_generator/table_helpers.hpp index 11091689469..7d862afe755 100644 --- a/cpp/benchmarks/common/tpch_data_generator/table_helpers.hpp +++ b/cpp/benchmarks/common/tpch_data_generator/table_helpers.hpp @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include @@ -37,7 +39,7 @@ std::unique_ptr add_calendrical_days( cudf::column_view const& timestamp_days, cudf::column_view const& days, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Perform a left join operation between two tables @@ -56,7 +58,7 @@ std::unique_ptr perform_left_join( std::vector const& left_on, std::vector const& right_on, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate the `p_retailprice` column of the `part` table @@ -68,7 +70,7 @@ std::unique_ptr perform_left_join( [[nodiscard]] std::unique_ptr calculate_p_retailprice( cudf::column_view const& p_partkey, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate the `l_suppkey` column of the `lineitem` table @@ -84,7 +86,7 @@ std::unique_ptr perform_left_join( cudf::size_type scale_factor, cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate the `ps_suppkey` column of the `partsupp` table @@ -100,7 +102,7 @@ std::unique_ptr perform_left_join( cudf::size_type scale_factor, cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Calculate the cardinality of the `lineitem` table * @@ -111,7 +113,7 @@ std::unique_ptr perform_left_join( [[nodiscard]] cudf::size_type calculate_l_cardinality( cudf::column_view const& o_rep_freqs, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Calculate the charge column for the `lineitem` table * @@ -126,7 +128,7 @@ std::unique_ptr perform_left_join( cudf::column_view const& tax, cudf::column_view const& discount, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate a column of random addresses according to TPC-H specification clause 4.2.2.7 @@ -138,7 +140,7 @@ std::unique_ptr perform_left_join( [[nodiscard]] std::unique_ptr generate_address_column( cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate a phone number column according to TPC-H specification clause 4.2.2.9 @@ -150,6 +152,6 @@ std::unique_ptr perform_left_join( [[nodiscard]] std::unique_ptr generate_phone_column( cudf::size_type num_rows, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); } // namespace cudf::datagen diff --git a/cpp/benchmarks/common/tpch_data_generator/tpch_data_generator.cpp b/cpp/benchmarks/common/tpch_data_generator/tpch_data_generator.cpp index 9001c50c5a5..236fe8095ad 100644 --- a/cpp/benchmarks/common/tpch_data_generator/tpch_data_generator.cpp +++ b/cpp/benchmarks/common/tpch_data_generator/tpch_data_generator.cpp @@ -36,6 +36,9 @@ #include #include +#include +#include + #include #include #include diff --git a/cpp/benchmarks/common/tpch_data_generator/tpch_data_generator.hpp b/cpp/benchmarks/common/tpch_data_generator/tpch_data_generator.hpp index a6286dd8dba..6e09c1e5708 100644 --- a/cpp/benchmarks/common/tpch_data_generator/tpch_data_generator.hpp +++ b/cpp/benchmarks/common/tpch_data_generator/tpch_data_generator.hpp @@ -17,6 +17,8 @@ #pragma once #include +#include +#include namespace CUDF_EXPORT cudf { namespace datagen { @@ -32,7 +34,7 @@ std::tuple, std::unique_ptr, std::uniq generate_orders_lineitem_part( double scale_factor, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate the `partsupp` table @@ -44,7 +46,7 @@ generate_orders_lineitem_part( std::unique_ptr generate_partsupp( double scale_factor, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate the `supplier` table @@ -56,7 +58,7 @@ std::unique_ptr generate_partsupp( std::unique_ptr generate_supplier( double scale_factor, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate the `customer` table @@ -68,7 +70,7 @@ std::unique_ptr generate_supplier( std::unique_ptr generate_customer( double scale_factor, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate the `nation` table @@ -78,7 +80,7 @@ std::unique_ptr generate_customer( */ std::unique_ptr generate_nation( rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate the `region` table @@ -88,7 +90,7 @@ std::unique_ptr generate_nation( */ std::unique_ptr generate_region( rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); } // namespace datagen } // namespace CUDF_EXPORT cudf diff --git a/cpp/benchmarks/copying/contiguous_split.cu b/cpp/benchmarks/copying/contiguous_split.cu index 910fc689c0b..161f67425c1 100644 --- a/cpp/benchmarks/copying/contiguous_split.cu +++ b/cpp/benchmarks/copying/contiguous_split.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023, NVIDIA CORPORATION. + * Copyright (c) 2019-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. @@ -22,6 +22,7 @@ #include #include +#include #include @@ -32,7 +33,7 @@ void contiguous_split(cudf::table_view const& src_table, std::vector const&) { - auto const mr = rmm::mr::get_current_device_resource(); + auto const mr = cudf::get_current_device_resource_ref(); auto const stream = cudf::get_default_stream(); auto user_buffer = rmm::device_uvector(100L * 1024 * 1024, stream, mr); auto chunked_pack = cudf::chunked_pack::create(src_table, user_buffer.size(), mr); diff --git a/cpp/benchmarks/copying/shift.cu b/cpp/benchmarks/copying/shift.cu index efc385cf10b..8f8e17ad4d0 100644 --- a/cpp/benchmarks/copying/shift.cu +++ b/cpp/benchmarks/copying/shift.cu @@ -20,14 +20,13 @@ #include #include #include - -#include +#include template > std::unique_ptr make_scalar( T value = 0, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto s = new ScalarType(value, true, stream, mr); return std::unique_ptr(s); diff --git a/cpp/benchmarks/fixture/benchmark_fixture.hpp b/cpp/benchmarks/fixture/benchmark_fixture.hpp index 8900899f9be..2f697ab0459 100644 --- a/cpp/benchmarks/fixture/benchmark_fixture.hpp +++ b/cpp/benchmarks/fixture/benchmark_fixture.hpp @@ -16,10 +16,11 @@ #pragma once +#include + #include #include #include -#include #include #include @@ -83,13 +84,13 @@ class benchmark : public ::benchmark::Fixture { void SetUp(::benchmark::State const& state) override { mr = make_pool_instance(); - rmm::mr::set_current_device_resource(mr.get()); // set default resource to pool + cudf::set_current_device_resource(mr.get()); // set default resource to pool } void TearDown(::benchmark::State const& state) override { // reset default resource to the initial resource - rmm::mr::set_current_device_resource(nullptr); + cudf::set_current_device_resource(nullptr); mr.reset(); } @@ -106,13 +107,13 @@ class benchmark : public ::benchmark::Fixture { class memory_stats_logger { public: memory_stats_logger() - : existing_mr(rmm::mr::get_current_device_resource()), + : existing_mr(cudf::get_current_device_resource()), statistics_mr(rmm::mr::statistics_resource_adaptor(existing_mr)) { - rmm::mr::set_current_device_resource(&statistics_mr); + cudf::set_current_device_resource(&statistics_mr); } - ~memory_stats_logger() { rmm::mr::set_current_device_resource(existing_mr); } + ~memory_stats_logger() { cudf::set_current_device_resource(existing_mr); } [[nodiscard]] size_t peak_memory_usage() const noexcept { diff --git a/cpp/benchmarks/fixture/nvbench_fixture.hpp b/cpp/benchmarks/fixture/nvbench_fixture.hpp index df1492690bb..63f09285a26 100644 --- a/cpp/benchmarks/fixture/nvbench_fixture.hpp +++ b/cpp/benchmarks/fixture/nvbench_fixture.hpp @@ -16,6 +16,7 @@ #pragma once #include +#include #include #include @@ -24,10 +25,8 @@ #include #include #include -#include #include #include -#include #include @@ -110,7 +109,7 @@ struct nvbench_base_fixture { } mr = create_memory_resource(rmm_mode); - rmm::mr::set_current_device_resource(mr.get()); + cudf::set_current_device_resource(mr.get()); std::cout << "RMM memory resource = " << rmm_mode << "\n"; cudf::set_pinned_memory_resource(create_cuio_host_memory_resource(cuio_host_mode)); diff --git a/cpp/benchmarks/io/cuio_common.cpp b/cpp/benchmarks/io/cuio_common.cpp index 645994f3f0d..fe24fb58728 100644 --- a/cpp/benchmarks/io/cuio_common.cpp +++ b/cpp/benchmarks/io/cuio_common.cpp @@ -18,9 +18,9 @@ #include #include +#include #include -#include #include @@ -34,7 +34,7 @@ temp_directory const cuio_source_sink_pair::tmpdir{"cudf_gbench"}; // Don't use cudf's pinned pool for the source data rmm::host_async_resource_ref pinned_memory_resource() { - static rmm::mr::pinned_host_memory_resource mr = rmm::mr::pinned_host_memory_resource{}; + static auto mr = rmm::mr::pinned_host_memory_resource{}; return mr; } diff --git a/cpp/benchmarks/io/json/nested_json.cpp b/cpp/benchmarks/io/json/nested_json.cpp index 9fd8de172a3..ae3528b783c 100644 --- a/cpp/benchmarks/io/json/nested_json.cpp +++ b/cpp/benchmarks/io/json/nested_json.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -170,7 +171,7 @@ void BM_NESTED_JSON(nvbench::state& state) cudf::device_span{input->data(), static_cast(input->size())}, default_options, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); }); auto const time = state.get_summary("nv/cold/time/gpu/mean").get_float64("value"); @@ -201,7 +202,7 @@ void BM_NESTED_JSON_DEPTH(nvbench::state& state) state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) { // Allocate device-side temporary storage & run algorithm cudf::io::json::detail::device_parse_nested_json( - input, default_options, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + input, default_options, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); }); auto const time = state.get_summary("nv/cold/time/gpu/mean").get_float64("value"); diff --git a/cpp/benchmarks/io/orc/orc_reader_multithreaded.cpp b/cpp/benchmarks/io/orc/orc_reader_multithreaded.cpp index e91bf06fdfa..6f20b4bd457 100644 --- a/cpp/benchmarks/io/orc/orc_reader_multithreaded.cpp +++ b/cpp/benchmarks/io/orc/orc_reader_multithreaded.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -109,7 +110,7 @@ void BM_orc_multithreaded_read_common(nvbench::state& state, auto const stream = streams[index % num_threads]; cudf::io::orc_reader_options read_opts = cudf::io::orc_reader_options::builder(source_info_vector[index]); - cudf::io::read_orc(read_opts, stream, rmm::mr::get_current_device_resource()); + cudf::io::read_orc(read_opts, stream, cudf::get_current_device_resource_ref()); }; threads.pause(); diff --git a/cpp/benchmarks/io/parquet/parquet_reader_multithread.cpp b/cpp/benchmarks/io/parquet/parquet_reader_multithread.cpp index 9e76ebb71ab..3abd4280081 100644 --- a/cpp/benchmarks/io/parquet/parquet_reader_multithread.cpp +++ b/cpp/benchmarks/io/parquet/parquet_reader_multithread.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -111,7 +112,7 @@ void BM_parquet_multithreaded_read_common(nvbench::state& state, auto const stream = streams[index % num_threads]; cudf::io::parquet_reader_options read_opts = cudf::io::parquet_reader_options::builder(source_info_vector[index]); - cudf::io::read_parquet(read_opts, stream, rmm::mr::get_current_device_resource()); + cudf::io::read_parquet(read_opts, stream, cudf::get_current_device_resource_ref()); }; threads.pause(); diff --git a/cpp/benchmarks/iterator/iterator.cu b/cpp/benchmarks/iterator/iterator.cu index fd0cebb12ea..e2576c0d690 100644 --- a/cpp/benchmarks/iterator/iterator.cu +++ b/cpp/benchmarks/iterator/iterator.cu @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -138,7 +139,7 @@ void BM_iterator(benchmark::State& state) // Initialize dev_result to false auto dev_result = cudf::detail::make_zeroed_device_uvector_sync( - 1, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + 1, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); for (auto _ : state) { cuda_event_timer raii(state, true); // flush_l2_cache = true, stream = 0 if (cub_or_thrust) { diff --git a/cpp/benchmarks/join/join_common.hpp b/cpp/benchmarks/join/join_common.hpp index 3d9d9c57548..1f1ca414ad1 100644 --- a/cpp/benchmarks/join/join_common.hpp +++ b/cpp/benchmarks/join/join_common.hpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -86,7 +87,7 @@ void BM_join(state_type& state, Join JoinFunc) validity + size, thrust::identity{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); }; std::unique_ptr right_key_column0 = [&]() { diff --git a/cpp/benchmarks/json/json.cu b/cpp/benchmarks/json/json.cu index 06b793bf5f1..6d01f132189 100644 --- a/cpp/benchmarks/json/json.cu +++ b/cpp/benchmarks/json/json.cu @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -171,7 +172,7 @@ auto build_json_string_column(int desired_bytes, int num_rows) json_benchmark_row_builder jb{ desired_bytes, num_rows, {*d_books, *d_bicycles}, *d_book_pct, *d_misc_order, *d_store_order}; auto [offsets, chars] = cudf::strings::detail::make_strings_children( - jb, num_rows, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + jb, num_rows, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); return cudf::make_strings_column(num_rows, std::move(offsets), chars.release(), 0, {}); } diff --git a/cpp/benchmarks/lists/copying/scatter_lists.cu b/cpp/benchmarks/lists/copying/scatter_lists.cu index 570decf410f..526a43d9ff5 100644 --- a/cpp/benchmarks/lists/copying/scatter_lists.cu +++ b/cpp/benchmarks/lists/copying/scatter_lists.cu @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -38,7 +39,7 @@ template void BM_lists_scatter(::benchmark::State& state) { auto stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); cudf::size_type const base_size{(cudf::size_type)state.range(0)}; cudf::size_type const num_elements_per_row{(cudf::size_type)state.range(1)}; diff --git a/cpp/benchmarks/lists/set_operations.cpp b/cpp/benchmarks/lists/set_operations.cpp index 6bed33d2570..8a94227c23b 100644 --- a/cpp/benchmarks/lists/set_operations.cpp +++ b/cpp/benchmarks/lists/set_operations.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-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. @@ -17,6 +17,7 @@ #include #include +#include #include @@ -55,7 +56,7 @@ void nvbench_set_op(nvbench::state& state, BenchFuncPtr bfunc) cudf::null_equality::EQUAL, cudf::nan_equality::ALL_EQUAL, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); }); } diff --git a/cpp/benchmarks/merge/merge_lists.cpp b/cpp/benchmarks/merge/merge_lists.cpp index bcb9f10ac83..2fe8b02055b 100644 --- a/cpp/benchmarks/merge/merge_lists.cpp +++ b/cpp/benchmarks/merge/merge_lists.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-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. @@ -18,6 +18,7 @@ #include #include +#include #include @@ -27,11 +28,11 @@ void nvbench_merge_list(nvbench::state& state) auto const input1 = create_lists_data(state); auto const sorted_input1 = - cudf::detail::sort(*input1, {}, {}, stream, rmm::mr::get_current_device_resource()); + cudf::detail::sort(*input1, {}, {}, stream, cudf::get_current_device_resource_ref()); auto const input2 = create_lists_data(state); auto const sorted_input2 = - cudf::detail::sort(*input2, {}, {}, stream, rmm::mr::get_current_device_resource()); + cudf::detail::sort(*input2, {}, {}, stream, cudf::get_current_device_resource_ref()); stream.synchronize(); @@ -43,7 +44,7 @@ void nvbench_merge_list(nvbench::state& state) {cudf::order::ASCENDING}, {}, stream_view, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); }); } diff --git a/cpp/benchmarks/merge/merge_structs.cpp b/cpp/benchmarks/merge/merge_structs.cpp index 9c56b44b623..cfb44d2737f 100644 --- a/cpp/benchmarks/merge/merge_structs.cpp +++ b/cpp/benchmarks/merge/merge_structs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-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. @@ -18,6 +18,7 @@ #include #include +#include #include @@ -27,11 +28,11 @@ void nvbench_merge_struct(nvbench::state& state) auto const input1 = create_structs_data(state); auto const sorted_input1 = - cudf::detail::sort(*input1, {}, {}, stream, rmm::mr::get_current_device_resource()); + cudf::detail::sort(*input1, {}, {}, stream, cudf::get_current_device_resource_ref()); auto const input2 = create_structs_data(state); auto const sorted_input2 = - cudf::detail::sort(*input2, {}, {}, stream, rmm::mr::get_current_device_resource()); + cudf::detail::sort(*input2, {}, {}, stream, cudf::get_current_device_resource_ref()); stream.synchronize(); @@ -43,7 +44,7 @@ void nvbench_merge_struct(nvbench::state& state) {cudf::order::ASCENDING}, {}, stream_view, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); }); } diff --git a/cpp/benchmarks/reduction/rank.cpp b/cpp/benchmarks/reduction/rank.cpp index 14876c80d3e..05aeed47fa6 100644 --- a/cpp/benchmarks/reduction/rank.cpp +++ b/cpp/benchmarks/reduction/rank.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -45,7 +46,7 @@ static void nvbench_reduction_scan(nvbench::state& state, nvbench::type_list #include +#include #include @@ -57,7 +58,7 @@ static void nvbench_structs_scan(nvbench::state& state) std::unique_ptr result = nullptr; state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) { result = cudf::detail::scan_inclusive( - input_view, *agg, null_policy, stream, rmm::mr::get_current_device_resource()); + input_view, *agg, null_policy, stream, cudf::get_current_device_resource_ref()); }); state.add_element_count(input_view.size()); diff --git a/cpp/benchmarks/search/contains_table.cpp b/cpp/benchmarks/search/contains_table.cpp index 17702d0741c..3bc1ac9c70a 100644 --- a/cpp/benchmarks/search/contains_table.cpp +++ b/cpp/benchmarks/search/contains_table.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-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. @@ -20,8 +20,7 @@ #include #include #include - -#include +#include #include @@ -58,7 +57,7 @@ static void nvbench_contains_table(nvbench::state& state, nvbench::type_list #include +#include #include @@ -39,7 +40,7 @@ void nvbench_rank_lists(nvbench::state& state, nvbench::type_list #include +#include #include @@ -37,7 +38,7 @@ void nvbench_rank_structs(nvbench::state& state, nvbench::type_list #include +#include #include @@ -33,7 +34,7 @@ void sort_multiple_lists(nvbench::state& state) state.set_cuda_stream(nvbench::make_cuda_stream_view(stream.value())); state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) { cudf::detail::sorted_order( - *input_table, {}, {}, stream, rmm::mr::get_current_device_resource()); + *input_table, {}, {}, stream, cudf::get_current_device_resource_ref()); }); } @@ -76,7 +77,8 @@ void sort_lists_of_structs(nvbench::state& state) state.set_cuda_stream(nvbench::make_cuda_stream_view(stream.value())); state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) { rmm::cuda_stream_view stream_view{launch.get_stream()}; - cudf::detail::sorted_order(input_table, {}, {}, stream, rmm::mr::get_current_device_resource()); + cudf::detail::sorted_order( + input_table, {}, {}, stream, cudf::get_current_device_resource_ref()); }); } diff --git a/cpp/benchmarks/sort/sort_structs.cpp b/cpp/benchmarks/sort/sort_structs.cpp index 3a3d1080ba0..fa1cf0279dd 100644 --- a/cpp/benchmarks/sort/sort_structs.cpp +++ b/cpp/benchmarks/sort/sort_structs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-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. @@ -17,6 +17,7 @@ #include #include +#include #include @@ -26,7 +27,8 @@ void nvbench_sort_struct(nvbench::state& state) state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) { rmm::cuda_stream_view stream_view{launch.get_stream()}; - cudf::detail::sorted_order(*input, {}, {}, stream_view, rmm::mr::get_current_device_resource()); + cudf::detail::sorted_order( + *input, {}, {}, stream_view, cudf::get_current_device_resource_ref()); }); } diff --git a/cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md b/cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md index aa054ba93e9..fce8adb4c06 100644 --- a/cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md +++ b/cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md @@ -223,17 +223,17 @@ can be passed to libcudf functions via `rmm::device_async_resource_ref` paramete ### Current Device Memory Resource -RMM provides a "default" memory resource for each device that can be accessed and updated via the -`rmm::mr::get_current_device_resource()` and `rmm::mr::set_current_device_resource(...)` functions, -respectively. All memory resource parameters should be defaulted to use the return value of -`rmm::mr::get_current_device_resource()`. +RMM provides a "default" memory resource for each device and functions to access and set it. libcudf +provides wrappers for these functions in `cpp/include/cudf/utilities/memory_resource.hpp`. +All memory resource parameters should be defaulted to use the return value of +`cudf::get_current_device_resource_ref()`. ### Resource Refs Memory resources are passed via resource ref parameters. A resource ref is a memory resource wrapper that enables consumers to specify properties of resources that they expect. These are defined -in the `cuda::mr` namespace of libcu++, but RMM provides some convenience wrappers in -`rmm/resource_ref.hpp`: +in the `cuda::mr` namespace of libcu++, but RMM provides some convenience aliases in +`rmm/resource_ref.hpp`. - `rmm::device_resource_ref` accepts a memory resource that provides synchronous allocation of device-accessible memory. - `rmm::device_async_resource_ref` accepts a memory resource that provides stream-ordered allocation @@ -247,7 +247,8 @@ in the `cuda::mr` namespace of libcu++, but RMM provides some convenience wrappe - `rmm::host_async_resource_ref` accepts a memory resource that provides stream-ordered allocation of host- and device-accessible memory. -See the libcu++ [docs on `resource_ref`](https://nvidia.github.io/cccl/libcudacxx/extended_api/memory_resource/resource_ref.html) for more information. +See the libcu++ [docs on `resource_ref`](https://nvidia.github.io/cccl/libcudacxx/extended_api/memory_resource/resource_ref.html) +for more information. ## cudf::column @@ -515,7 +516,7 @@ For example: // cpp/include/cudf/header.hpp void external_function(..., rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); // cpp/include/cudf/detail/header.hpp namespace detail{ @@ -575,7 +576,7 @@ whose outputs will be returned. Example: // Returned `column` contains newly allocated memory, // therefore the API must accept a memory resource pointer std::unique_ptr returns_output_memory( - ..., rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + ..., rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); // This API does not allocate any new *output* memory, therefore // a memory resource is unnecessary @@ -586,17 +587,17 @@ This rule automatically applies to all detail APIs that allocate memory. Any det called by any public API, and therefore could be allocating memory that is returned to the user. To support such uses cases, all detail APIs allocating memory resources should accept an `mr` parameter. Callers are responsible for either passing through a provided `mr` or -`rmm::mr::get_current_device_resource()` as needed. +`cudf::get_current_device_resource_ref()` as needed. ### Temporary Memory Not all memory allocated within a libcudf API is returned to the caller. Often algorithms must allocate temporary, scratch memory for intermediate results. Always use the default resource -obtained from `rmm::mr::get_current_device_resource()` for temporary memory allocations. Example: +obtained from `cudf::get_current_device_resource_ref()` for temporary memory allocations. Example: ```c++ rmm::device_buffer some_function( - ..., rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) { + ..., rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { rmm::device_buffer returned_buffer(..., mr); // Returned buffer uses the passed in MR ... rmm::device_buffer temporary_buffer(...); // Temporary buffer uses default MR @@ -613,7 +614,7 @@ use memory resources for device memory allocation with automated lifetime manage #### rmm::device_buffer Allocates a specified number of bytes of untyped, uninitialized device memory using a memory resource. If no `rmm::device_async_resource_ref` is explicitly provided, it uses -`rmm::mr::get_current_device_resource()`. +`cudf::get_current_device_resource_ref()`. `rmm::device_buffer` is movable and copyable on a stream. A copy performs a deep copy of the `device_buffer`'s device memory on the specified stream, whereas a move moves ownership of the @@ -685,7 +686,7 @@ rmm::device_uvector v(100, s); // Initializes the elements to 0 thrust::uninitialized_fill(thrust::cuda::par.on(s.value()), v.begin(), v.end(), int32_t{0}); -rmm::mr::device_memory_resource * mr = new my_custom_resource{...}; +auto mr = new my_custom_resource{...}; // Allocates uninitialized storage for 100 `int32_t` elements on stream `s` using the resource `mr` rmm::device_uvector v2{100, s, mr}; ``` diff --git a/cpp/examples/basic/src/process_csv.cpp b/cpp/examples/basic/src/process_csv.cpp index 0d2b6b099ac..d27789a78a6 100644 --- a/cpp/examples/basic/src/process_csv.cpp +++ b/cpp/examples/basic/src/process_csv.cpp @@ -90,7 +90,7 @@ int main(int argc, char** argv) // it being set as the default // Also, call this before the first libcudf API call to ensure all data is allocated by the same // memory resource. - rmm::mr::set_current_device_resource(&mr); + cudf::set_current_device_resource(&mr); // Read data auto stock_table_with_metadata = read_csv("4stock_5day.csv"); diff --git a/cpp/examples/interop/interop.cpp b/cpp/examples/interop/interop.cpp index 8271c3836e4..133a4e3a514 100644 --- a/cpp/examples/interop/interop.cpp +++ b/cpp/examples/interop/interop.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -104,7 +105,7 @@ auto make_chars_and_offsets(std::vector const& strings) std::unique_ptr arrow_string_view_to_cudf_column( std::shared_ptr const& array, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { // Convert the string views into chars and offsets std::vector strings; diff --git a/cpp/examples/nested_types/deduplication.cpp b/cpp/examples/nested_types/deduplication.cpp index c7c54592b70..f067b358f2d 100644 --- a/cpp/examples/nested_types/deduplication.cpp +++ b/cpp/examples/nested_types/deduplication.cpp @@ -192,7 +192,7 @@ int main(int argc, char const** argv) auto pool = mr_name == "pool"; auto resource = create_memory_resource(pool); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); std::cout << "Reading " << input_filepath << "..." << std::endl; // read input file diff --git a/cpp/examples/parquet_io/parquet_io.cpp b/cpp/examples/parquet_io/parquet_io.cpp index 274a2599189..442731694fa 100644 --- a/cpp/examples/parquet_io/parquet_io.cpp +++ b/cpp/examples/parquet_io/parquet_io.cpp @@ -123,7 +123,7 @@ int main(int argc, char const** argv) // Create and use a memory pool bool is_pool_used = true; auto resource = create_memory_resource(is_pool_used); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); // Read input parquet file // We do not want to time the initial read time as it may include diff --git a/cpp/examples/strings/common.hpp b/cpp/examples/strings/common.hpp index 65a9c100c7c..1855374803a 100644 --- a/cpp/examples/strings/common.hpp +++ b/cpp/examples/strings/common.hpp @@ -93,7 +93,7 @@ int main(int argc, char const** argv) auto const mr_name = std::string{argc > 2 ? std::string(argv[2]) : std::string("cuda")}; auto resource = create_memory_resource(mr_name); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); auto const csv_file = std::string{argv[1]}; auto const csv_result = [csv_file] { diff --git a/cpp/examples/tpch/q1.cpp b/cpp/examples/tpch/q1.cpp index fe03320b888..87b7e613766 100644 --- a/cpp/examples/tpch/q1.cpp +++ b/cpp/examples/tpch/q1.cpp @@ -20,6 +20,7 @@ #include #include #include +#include /** * @file q1.cpp @@ -62,7 +63,7 @@ cudf::column_view const& discount, cudf::column_view const& extendedprice, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto const one = cudf::numeric_scalar(1); auto const one_minus_discount = @@ -89,7 +90,7 @@ cudf::column_view const& tax, cudf::column_view const& disc_price, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto const one = cudf::numeric_scalar(1); auto const one_plus_tax = @@ -106,7 +107,7 @@ int main(int argc, char const** argv) // Use a memory pool auto resource = create_memory_resource(args.memory_resource_type); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); cudf::examples::timer timer; diff --git a/cpp/examples/tpch/q10.cpp b/cpp/examples/tpch/q10.cpp index 94da46f6930..fdf147b50e0 100644 --- a/cpp/examples/tpch/q10.cpp +++ b/cpp/examples/tpch/q10.cpp @@ -20,6 +20,7 @@ #include #include #include +#include /** * @file q10.cpp @@ -75,7 +76,7 @@ cudf::column_view const& extendedprice, cudf::column_view const& discount, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto const one = cudf::numeric_scalar(1); auto const one_minus_discount = @@ -95,7 +96,7 @@ int main(int argc, char const** argv) // Use a memory pool auto resource = create_memory_resource(args.memory_resource_type); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); cudf::examples::timer timer; diff --git a/cpp/examples/tpch/q5.cpp b/cpp/examples/tpch/q5.cpp index 89396a6c968..12c186db10e 100644 --- a/cpp/examples/tpch/q5.cpp +++ b/cpp/examples/tpch/q5.cpp @@ -20,6 +20,7 @@ #include #include #include +#include /** * @file q5.cpp @@ -70,7 +71,7 @@ cudf::column_view const& extendedprice, cudf::column_view const& discount, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto const one = cudf::numeric_scalar(1); auto const one_minus_discount = @@ -91,7 +92,7 @@ int main(int argc, char const** argv) // Use a memory pool auto resource = create_memory_resource(args.memory_resource_type); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); cudf::examples::timer timer; diff --git a/cpp/examples/tpch/q6.cpp b/cpp/examples/tpch/q6.cpp index 405b2ac73ca..92dac40c768 100644 --- a/cpp/examples/tpch/q6.cpp +++ b/cpp/examples/tpch/q6.cpp @@ -20,6 +20,7 @@ #include #include #include +#include /** * @file q6.cpp @@ -51,7 +52,7 @@ cudf::column_view const& extendedprice, cudf::column_view const& discount, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto const revenue_type = cudf::data_type{cudf::type_id::FLOAT64}; auto revenue = cudf::binary_operation( @@ -65,7 +66,7 @@ int main(int argc, char const** argv) // Use a memory pool auto resource = create_memory_resource(args.memory_resource_type); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); cudf::examples::timer timer; diff --git a/cpp/examples/tpch/q9.cpp b/cpp/examples/tpch/q9.cpp index d3c218253f9..2882182aa2b 100644 --- a/cpp/examples/tpch/q9.cpp +++ b/cpp/examples/tpch/q9.cpp @@ -22,6 +22,7 @@ #include #include #include +#include /** * @file q9.cpp @@ -84,7 +85,7 @@ cudf::column_view const& supplycost, cudf::column_view const& quantity, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto const one = cudf::numeric_scalar(1); auto const one_minus_discount = @@ -114,7 +115,7 @@ int main(int argc, char const** argv) // Use a memory pool auto resource = create_memory_resource(args.memory_resource_type); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); cudf::examples::timer timer; diff --git a/cpp/examples/tpch/utils.hpp b/cpp/examples/tpch/utils.hpp index e586da2c802..8102fa8f976 100644 --- a/cpp/examples/tpch/utils.hpp +++ b/cpp/examples/tpch/utils.hpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -189,7 +190,7 @@ std::vector concat(std::vector const& lhs, std::vector const& rhs) auto const left_selected = left_input.select(left_on); auto const right_selected = right_input.select(right_on); auto const [left_join_indices, right_join_indices] = cudf::inner_join( - left_selected, right_selected, compare_nulls, rmm::mr::get_current_device_resource()); + left_selected, right_selected, compare_nulls, cudf::get_current_device_resource_ref()); auto const left_indices_span = cudf::device_span{*left_join_indices}; auto const right_indices_span = cudf::device_span{*right_join_indices}; diff --git a/cpp/include/cudf/ast/detail/expression_parser.hpp b/cpp/include/cudf/ast/detail/expression_parser.hpp index da552d95421..a254171ef11 100644 --- a/cpp/include/cudf/ast/detail/expression_parser.hpp +++ b/cpp/include/cudf/ast/detail/expression_parser.hpp @@ -20,8 +20,7 @@ #include #include #include - -#include +#include #include diff --git a/cpp/include/cudf/binaryop.hpp b/cpp/include/cudf/binaryop.hpp index 51199bb5792..63908f6c870 100644 --- a/cpp/include/cudf/binaryop.hpp +++ b/cpp/include/cudf/binaryop.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -171,7 +169,7 @@ std::unique_ptr binary_operation( binary_operator op, data_type output_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a binary operation between a column and a scalar. @@ -202,7 +200,7 @@ std::unique_ptr binary_operation( binary_operator op, data_type output_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a binary operation between two columns. @@ -232,7 +230,7 @@ std::unique_ptr binary_operation( binary_operator op, data_type output_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a binary operation between two columns using a @@ -263,7 +261,7 @@ std::unique_ptr binary_operation( std::string const& ptx, data_type output_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the `scale` for a `fixed_point` number based on given binary operator `op` @@ -315,7 +313,7 @@ std::pair scalar_col_valid_mask_and( column_view const& col, scalar const& s, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); } // namespace binops diff --git a/cpp/include/cudf/column/column.hpp b/cpp/include/cudf/column/column.hpp index 5d1d74c3f28..de19a076cc4 100644 --- a/cpp/include/cudf/column/column.hpp +++ b/cpp/include/cudf/column/column.hpp @@ -19,12 +19,11 @@ #include #include #include +#include #include #include #include -#include -#include #include #include @@ -65,7 +64,7 @@ class column { */ column(column const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Move the contents from `other` to create a new column. @@ -143,7 +142,7 @@ class column { */ explicit column(column_view view, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the column's logical element type diff --git a/cpp/include/cudf/column/column_factories.hpp b/cpp/include/cudf/column/column_factories.hpp index b2dcb25acb5..c3b68b52c36 100644 --- a/cpp/include/cudf/column/column_factories.hpp +++ b/cpp/include/cudf/column/column_factories.hpp @@ -18,12 +18,11 @@ #include #include #include +#include #include #include #include -#include -#include #include @@ -78,7 +77,7 @@ std::unique_ptr make_numeric_column( size_type size, mask_state state = mask_state::UNALLOCATED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct column with sufficient uninitialized storage to hold `size` elements of the @@ -104,7 +103,7 @@ std::unique_ptr make_numeric_column( B&& null_mask, size_type null_count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { CUDF_EXPECTS(is_numeric(type), "Invalid, non-numeric type."); return std::make_unique(type, @@ -136,7 +135,7 @@ std::unique_ptr make_fixed_point_column( size_type size, mask_state state = mask_state::UNALLOCATED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct column with sufficient uninitialized storage to hold `size` elements of the @@ -161,7 +160,7 @@ std::unique_ptr make_fixed_point_column( B&& null_mask, size_type null_count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { CUDF_EXPECTS(is_fixed_point(type), "Invalid, non-fixed_point type."); return std::make_unique(type, @@ -194,7 +193,7 @@ std::unique_ptr make_timestamp_column( size_type size, mask_state state = mask_state::UNALLOCATED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct column with sufficient uninitialized storage to hold `size` elements of the @@ -220,7 +219,7 @@ std::unique_ptr make_timestamp_column( B&& null_mask, size_type null_count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { CUDF_EXPECTS(is_timestamp(type), "Invalid, non-timestamp type."); return std::make_unique(type, @@ -253,7 +252,7 @@ std::unique_ptr make_duration_column( size_type size, mask_state state = mask_state::UNALLOCATED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct column with sufficient uninitialized storage to hold `size` elements of the @@ -279,7 +278,7 @@ std::unique_ptr make_duration_column( B&& null_mask, size_type null_count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { CUDF_EXPECTS(is_duration(type), "Invalid, non-duration type."); return std::make_unique(type, @@ -312,7 +311,7 @@ std::unique_ptr make_fixed_width_column( size_type size, mask_state state = mask_state::UNALLOCATED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct column with sufficient uninitialized storage to hold `size` elements of the @@ -338,7 +337,7 @@ std::unique_ptr make_fixed_width_column( B&& null_mask, size_type null_count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { CUDF_EXPECTS(is_fixed_width(type), "Invalid, non-fixed-width type."); if (is_timestamp(type)) { @@ -377,7 +376,7 @@ std::unique_ptr make_fixed_width_column( std::unique_ptr make_strings_column( cudf::device_span const> strings, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a STRING type column given a device span of string_view. @@ -409,7 +408,7 @@ std::unique_ptr make_strings_column( cudf::device_span string_views, string_view const null_placeholder, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a STRING type column given offsets column, chars columns, and null mask and null @@ -497,7 +496,7 @@ std::unique_ptr make_lists_column( size_type null_count, rmm::device_buffer&& null_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a STRUCT column using specified child columns as members. @@ -528,7 +527,7 @@ std::unique_ptr make_structs_column( size_type null_count, rmm::device_buffer&& null_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a column with size elements that are all equal to the given scalar. @@ -548,7 +547,7 @@ std::unique_ptr make_column_from_scalar( scalar const& s, size_type size, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a dictionary column with size elements that are all equal to the given scalar. @@ -568,7 +567,7 @@ std::unique_ptr make_dictionary_from_scalar( scalar const& s, size_type size, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/concatenate.hpp b/cpp/include/cudf/concatenate.hpp index 0935bdf7def..155740dc29e 100644 --- a/cpp/include/cudf/concatenate.hpp +++ b/cpp/include/cudf/concatenate.hpp @@ -19,11 +19,9 @@ #include #include #include +#include #include -#include -#include - #include namespace CUDF_EXPORT cudf { @@ -49,7 +47,7 @@ namespace CUDF_EXPORT cudf { rmm::device_buffer concatenate_masks( host_span views, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Concatenates multiple columns into a single column @@ -66,7 +64,7 @@ rmm::device_buffer concatenate_masks( std::unique_ptr concatenate( host_span columns_to_concat, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Columns of `tables_to_concat` are concatenated vertically to return a @@ -95,7 +93,7 @@ std::unique_ptr concatenate( std::unique_ptr concatenate( host_span tables_to_concat, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/contiguous_split.hpp b/cpp/include/cudf/contiguous_split.hpp index 195dac25268..41eef9559b8 100644 --- a/cpp/include/cudf/contiguous_split.hpp +++ b/cpp/include/cudf/contiguous_split.hpp @@ -19,8 +19,7 @@ #include #include #include - -#include +#include #include #include @@ -122,7 +121,7 @@ struct packed_table { std::vector contiguous_split( cudf::table_view const& input, std::vector const& splits, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); namespace detail { @@ -154,7 +153,7 @@ struct contiguous_split_state; * // Choose a memory resource (optional). This memory resource is used for scratch/thrust temporary * // data. In memory constrained cases, this can be used to set aside scratch memory * // for `chunked_pack` at the beginning of a program. - * auto mr = rmm::mr::get_current_device_resource(); + * auto mr = cudf::get_current_device_resource_ref(); * * // Define a buffer size for each chunk: the larger the buffer is, the more SMs can be * // occupied by this algorithm. @@ -205,7 +204,7 @@ class chunked_pack { explicit chunked_pack( cudf::table_view const& input, std::size_t user_buffer_size, - rmm::device_async_resource_ref temp_mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref temp_mr = cudf::get_current_device_resource_ref()); /** * @brief Destructor that will be implemented as default. Declared with definition here because @@ -270,7 +269,7 @@ class chunked_pack { [[nodiscard]] static std::unique_ptr create( cudf::table_view const& input, std::size_t user_buffer_size, - rmm::device_async_resource_ref temp_mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref temp_mr = cudf::get_current_device_resource_ref()); private: // internal state of contiguous split @@ -290,7 +289,7 @@ class chunked_pack { * and device memory respectively */ packed_columns pack(cudf::table_view const& input, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Produce the metadata used for packing a table stored in a contiguous buffer. diff --git a/cpp/include/cudf/copying.hpp b/cpp/include/cudf/copying.hpp index 3c44ff48fdf..388f19abea2 100644 --- a/cpp/include/cudf/copying.hpp +++ b/cpp/include/cudf/copying.hpp @@ -24,9 +24,7 @@ #include #include #include - -#include -#include +#include #include #include @@ -88,7 +86,7 @@ std::unique_ptr
gather( column_view const& gather_map, out_of_bounds_policy bounds_policy = out_of_bounds_policy::DONT_CHECK, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Reverses the rows within a table. @@ -108,7 +106,7 @@ std::unique_ptr
gather( std::unique_ptr
reverse( table_view const& source_table, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Reverses the elements of a column @@ -128,7 +126,7 @@ std::unique_ptr
reverse( std::unique_ptr reverse( column_view const& source_column, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Scatters the rows of the source table into a copy of the target table @@ -177,7 +175,7 @@ std::unique_ptr
scatter( column_view const& scatter_map, table_view const& target, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Scatters a row of scalar values into a copy of the target table @@ -220,7 +218,7 @@ std::unique_ptr
scatter( column_view const& indices, table_view const& target, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Indicates when to allocate a mask, based on an existing mask. @@ -268,7 +266,7 @@ std::unique_ptr allocate_like( column_view const& input, mask_allocation_policy mask_alloc = mask_allocation_policy::RETAIN, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates an uninitialized new column of the specified size and same type as the `input`. @@ -291,7 +289,7 @@ std::unique_ptr allocate_like( size_type size, mask_allocation_policy mask_alloc = mask_allocation_policy::RETAIN, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a table of empty columns with the same types as the `input_table` @@ -383,7 +381,7 @@ std::unique_ptr copy_range( size_type source_end, size_type target_begin, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a new column by shifting all values by an offset. @@ -427,7 +425,7 @@ std::unique_ptr shift( size_type offset, scalar const& fill_value, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Slices a `column_view` into a set of `column_view`s according to a set of indices. @@ -630,7 +628,7 @@ std::unique_ptr copy_if_else( column_view const& rhs, column_view const& boolean_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new column, where each element is selected from either @p lhs or @@ -656,7 +654,7 @@ std::unique_ptr copy_if_else( column_view const& rhs, column_view const& boolean_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new column, where each element is selected from either @p lhs or @@ -682,7 +680,7 @@ std::unique_ptr copy_if_else( scalar const& rhs, column_view const& boolean_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new column, where each element is selected from either @p lhs or @@ -706,7 +704,7 @@ std::unique_ptr copy_if_else( scalar const& rhs, column_view const& boolean_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Scatters rows from the input table to rows of the output corresponding @@ -750,7 +748,7 @@ std::unique_ptr
boolean_mask_scatter( table_view const& target, column_view const& boolean_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Scatters scalar values to rows of the output corresponding @@ -789,7 +787,7 @@ std::unique_ptr
boolean_mask_scatter( table_view const& target, column_view const& boolean_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Get the element at specified index from a column @@ -809,7 +807,7 @@ std::unique_ptr get_element( column_view const& input, size_type index, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Indicates whether a row can be sampled more than once. @@ -853,7 +851,7 @@ std::unique_ptr
sample( sample_with_replacement replacement = sample_with_replacement::FALSE, int64_t const seed = 0, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Checks if a column or its descendants have non-empty null rows @@ -970,7 +968,7 @@ bool may_have_nonempty_nulls(column_view const& input); std::unique_ptr purge_nonempty_nulls( column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/datetime.hpp b/cpp/include/cudf/datetime.hpp index f7bed8bdc7e..c7523c80b2b 100644 --- a/cpp/include/cudf/datetime.hpp +++ b/cpp/include/cudf/datetime.hpp @@ -18,9 +18,7 @@ #include #include - -#include -#include +#include #include @@ -49,7 +47,7 @@ namespace datetime { */ std::unique_ptr extract_year( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts month from any datetime type and returns an int16_t @@ -63,7 +61,7 @@ std::unique_ptr extract_year( */ std::unique_ptr extract_month( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts day from any datetime type and returns an int16_t @@ -77,7 +75,7 @@ std::unique_ptr extract_month( */ std::unique_ptr extract_day( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts a weekday from any datetime type and returns an int16_t @@ -91,7 +89,7 @@ std::unique_ptr extract_day( */ std::unique_ptr extract_weekday( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts hour from any datetime type and returns an int16_t @@ -105,7 +103,7 @@ std::unique_ptr extract_weekday( */ std::unique_ptr extract_hour( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts minute from any datetime type and returns an int16_t @@ -119,7 +117,7 @@ std::unique_ptr extract_hour( */ std::unique_ptr extract_minute( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts second from any datetime type and returns an int16_t @@ -133,7 +131,7 @@ std::unique_ptr extract_minute( */ std::unique_ptr extract_second( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts millisecond fraction from any datetime type and returns an int16_t @@ -150,7 +148,7 @@ std::unique_ptr extract_second( */ std::unique_ptr extract_millisecond_fraction( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts microsecond fraction from any datetime type and returns an int16_t @@ -167,7 +165,7 @@ std::unique_ptr extract_millisecond_fraction( */ std::unique_ptr extract_microsecond_fraction( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extracts nanosecond fraction from any datetime type and returns an int16_t @@ -184,7 +182,7 @@ std::unique_ptr extract_microsecond_fraction( */ std::unique_ptr extract_nanosecond_fraction( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group /** @@ -205,7 +203,7 @@ std::unique_ptr extract_nanosecond_fraction( */ std::unique_ptr last_day_of_month( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the day number since the start of the year from the datetime and @@ -219,7 +217,7 @@ std::unique_ptr last_day_of_month( */ std::unique_ptr day_of_year( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Adds or subtracts a number of months from the datetime type and returns a @@ -254,7 +252,7 @@ std::unique_ptr day_of_year( std::unique_ptr add_calendrical_months( cudf::column_view const& timestamps, cudf::column_view const& months, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Adds or subtracts a number of months from the datetime type and returns a @@ -289,7 +287,7 @@ std::unique_ptr add_calendrical_months( std::unique_ptr add_calendrical_months( cudf::column_view const& timestamps, cudf::scalar const& months, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Check if the year of the given date is a leap year @@ -306,7 +304,7 @@ std::unique_ptr add_calendrical_months( */ std::unique_ptr is_leap_year( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Extract the number of days in the month @@ -322,7 +320,7 @@ std::unique_ptr is_leap_year( */ std::unique_ptr days_in_month( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the quarter of the date @@ -338,7 +336,7 @@ std::unique_ptr days_in_month( */ std::unique_ptr extract_quarter( cudf::column_view const& column, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Fixed frequencies supported by datetime rounding functions ceil, floor, round. @@ -367,7 +365,7 @@ enum class rounding_frequency : int32_t { std::unique_ptr ceil_datetimes( cudf::column_view const& column, rounding_frequency freq, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Round datetimes down to the nearest multiple of the given frequency. @@ -382,7 +380,7 @@ std::unique_ptr ceil_datetimes( std::unique_ptr floor_datetimes( cudf::column_view const& column, rounding_frequency freq, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Round datetimes to the nearest multiple of the given frequency. @@ -397,7 +395,7 @@ std::unique_ptr floor_datetimes( std::unique_ptr round_datetimes( cudf::column_view const& column, rounding_frequency freq, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group diff --git a/cpp/include/cudf/detail/binaryop.hpp b/cpp/include/cudf/detail/binaryop.hpp index fe739327a08..91f774839d9 100644 --- a/cpp/include/cudf/detail/binaryop.hpp +++ b/cpp/include/cudf/detail/binaryop.hpp @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { //! Inner interfaces and implementations diff --git a/cpp/include/cudf/detail/calendrical_month_sequence.cuh b/cpp/include/cudf/detail/calendrical_month_sequence.cuh index a9cf54e29b8..2097411357d 100644 --- a/cpp/include/cudf/detail/calendrical_month_sequence.cuh +++ b/cpp/include/cudf/detail/calendrical_month_sequence.cuh @@ -21,11 +21,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/detail/concatenate.hpp b/cpp/include/cudf/detail/concatenate.hpp index 1be269710b2..51166f6054b 100644 --- a/cpp/include/cudf/detail/concatenate.hpp +++ b/cpp/include/cudf/detail/concatenate.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/include/cudf/detail/concatenate_masks.hpp b/cpp/include/cudf/detail/concatenate_masks.hpp index fc829361fde..4f9e7f9cd13 100644 --- a/cpp/include/cudf/detail/concatenate_masks.hpp +++ b/cpp/include/cudf/detail/concatenate_masks.hpp @@ -18,12 +18,12 @@ #include #include #include +#include #include #include #include #include -#include namespace CUDF_EXPORT cudf { //! Inner interfaces and implementations diff --git a/cpp/include/cudf/detail/contiguous_split.hpp b/cpp/include/cudf/detail/contiguous_split.hpp index 52c51daa917..52ca091e1cd 100644 --- a/cpp/include/cudf/detail/contiguous_split.hpp +++ b/cpp/include/cudf/detail/contiguous_split.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace detail { diff --git a/cpp/include/cudf/detail/copy.hpp b/cpp/include/cudf/detail/copy.hpp index 2be432c0825..60aa500f129 100644 --- a/cpp/include/cudf/detail/copy.hpp +++ b/cpp/include/cudf/detail/copy.hpp @@ -20,11 +20,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/include/cudf/detail/copy_if.cuh b/cpp/include/cudf/detail/copy_if.cuh index 4071fa01fb2..dfb646c66c4 100644 --- a/cpp/include/cudf/detail/copy_if.cuh +++ b/cpp/include/cudf/detail/copy_if.cuh @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -38,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/cpp/include/cudf/detail/copy_if_else.cuh b/cpp/include/cudf/detail/copy_if_else.cuh index d260a4591b7..a70cd5a0661 100644 --- a/cpp/include/cudf/detail/copy_if_else.cuh +++ b/cpp/include/cudf/detail/copy_if_else.cuh @@ -21,9 +21,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/include/cudf/detail/copy_range.cuh b/cpp/include/cudf/detail/copy_range.cuh index 1b3b2056c6c..3aa136d630b 100644 --- a/cpp/include/cudf/detail/copy_range.cuh +++ b/cpp/include/cudf/detail/copy_range.cuh @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/detail/datetime.hpp b/cpp/include/cudf/detail/datetime.hpp index 95469de8ae6..31782cbaf8a 100644 --- a/cpp/include/cudf/detail/datetime.hpp +++ b/cpp/include/cudf/detail/datetime.hpp @@ -18,8 +18,7 @@ #include #include - -#include +#include #include diff --git a/cpp/include/cudf/detail/distinct_hash_join.cuh b/cpp/include/cudf/detail/distinct_hash_join.cuh index 0b3d7ac58bf..2acc10105cf 100644 --- a/cpp/include/cudf/detail/distinct_hash_join.cuh +++ b/cpp/include/cudf/detail/distinct_hash_join.cuh @@ -18,10 +18,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/include/cudf/detail/fill.hpp b/cpp/include/cudf/detail/fill.hpp index 82c6af8b611..04b3b63a9ed 100644 --- a/cpp/include/cudf/detail/fill.hpp +++ b/cpp/include/cudf/detail/fill.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include #include diff --git a/cpp/include/cudf/detail/gather.cuh b/cpp/include/cudf/detail/gather.cuh index df6fe6e6ccb..d91c3df719a 100644 --- a/cpp/include/cudf/detail/gather.cuh +++ b/cpp/include/cudf/detail/gather.cuh @@ -33,12 +33,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -582,11 +582,11 @@ void gather_bitmask(table_view const& source, return col->mutable_view().null_mask(); }); auto d_target_masks = - make_device_uvector_async(target_masks, stream, rmm::mr::get_current_device_resource()); + make_device_uvector_async(target_masks, stream, cudf::get_current_device_resource_ref()); auto const device_source = table_device_view::create(source, stream); auto d_valid_counts = make_zeroed_device_uvector_async( - target.size(), stream, rmm::mr::get_current_device_resource()); + target.size(), stream, cudf::get_current_device_resource_ref()); // Dispatch operation enum to get implementation auto const impl = [op]() { diff --git a/cpp/include/cudf/detail/gather.hpp b/cpp/include/cudf/detail/gather.hpp index 39cd43934e3..48fb60aa5dd 100644 --- a/cpp/include/cudf/detail/gather.hpp +++ b/cpp/include/cudf/detail/gather.hpp @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/include/cudf/detail/groupby.hpp b/cpp/include/cudf/detail/groupby.hpp index 36eae05ce39..3e9511de5e4 100644 --- a/cpp/include/cudf/detail/groupby.hpp +++ b/cpp/include/cudf/detail/groupby.hpp @@ -17,10 +17,10 @@ #include #include +#include #include #include -#include #include #include diff --git a/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp b/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp index c0910b4d5ae..e3a6f7db2b5 100644 --- a/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp +++ b/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace groupby { namespace detail { diff --git a/cpp/include/cudf/detail/groupby/sort_helper.hpp b/cpp/include/cudf/detail/groupby/sort_helper.hpp index a411a890622..ce8783d8b79 100644 --- a/cpp/include/cudf/detail/groupby/sort_helper.hpp +++ b/cpp/include/cudf/detail/groupby/sort_helper.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace groupby::detail::sort { diff --git a/cpp/include/cudf/detail/hash_reduce_by_row.cuh b/cpp/include/cudf/detail/hash_reduce_by_row.cuh index 7a1e38eefe0..7de79b31bc7 100644 --- a/cpp/include/cudf/detail/hash_reduce_by_row.cuh +++ b/cpp/include/cudf/detail/hash_reduce_by_row.cuh @@ -18,11 +18,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/detail/interop.hpp b/cpp/include/cudf/detail/interop.hpp index 0d8f078c9d1..938d0e95097 100644 --- a/cpp/include/cudf/detail/interop.hpp +++ b/cpp/include/cudf/detail/interop.hpp @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace detail { diff --git a/cpp/include/cudf/detail/join.hpp b/cpp/include/cudf/detail/join.hpp index af46dd79cdb..b084a94cbc8 100644 --- a/cpp/include/cudf/detail/join.hpp +++ b/cpp/include/cudf/detail/join.hpp @@ -20,11 +20,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/include/cudf/detail/label_bins.hpp b/cpp/include/cudf/detail/label_bins.hpp index 92a417b0132..44fcba0d2d6 100644 --- a/cpp/include/cudf/detail/label_bins.hpp +++ b/cpp/include/cudf/detail/label_bins.hpp @@ -21,11 +21,10 @@ #include #include #include +#include #include #include -#include -#include namespace CUDF_EXPORT cudf { diff --git a/cpp/include/cudf/detail/merge.hpp b/cpp/include/cudf/detail/merge.hpp index 72e34b76158..43a0387ab99 100644 --- a/cpp/include/cudf/detail/merge.hpp +++ b/cpp/include/cudf/detail/merge.hpp @@ -17,9 +17,9 @@ #pragma once #include +#include #include -#include #include diff --git a/cpp/include/cudf/detail/null_mask.cuh b/cpp/include/cudf/detail/null_mask.cuh index ae6db5409cc..327c732716c 100644 --- a/cpp/include/cudf/detail/null_mask.cuh +++ b/cpp/include/cudf/detail/null_mask.cuh @@ -21,12 +21,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -164,7 +164,7 @@ size_type inplace_bitmask_binop(Binop op, CUDF_EXPECTS(std::all_of(masks.begin(), masks.end(), [](auto p) { return p != nullptr; }), "Mask pointer cannot be null"); - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource(); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref(); rmm::device_scalar d_counter{0, stream, mr}; rmm::device_uvector d_masks(masks.size(), stream, mr); rmm::device_uvector d_begin_bits(masks_begin_bits.size(), stream, mr); @@ -434,7 +434,7 @@ std::vector segmented_count_bits(bitmask_type const* bitmask, std::distance(indices_begin, indices_end), stream); std::copy(indices_begin, indices_end, std::back_inserter(h_indices)); auto const d_indices = - make_device_uvector_async(h_indices, stream, rmm::mr::get_current_device_resource()); + make_device_uvector_async(h_indices, stream, cudf::get_current_device_resource_ref()); // Compute the bit counts over each segment. auto first_bit_indices_begin = thrust::make_transform_iterator( @@ -449,7 +449,7 @@ std::vector segmented_count_bits(bitmask_type const* bitmask, last_bit_indices_begin, count_bits, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // Copy the results back to the host. return make_std_vector_sync(d_bit_counts, stream); @@ -576,7 +576,7 @@ std::pair segmented_null_mask_reduction( last_bit_indices_begin, cudf::detail::count_bits_policy::SET_BITS, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const length_and_valid_count = thrust::make_zip_iterator(segment_length_iterator, segment_valid_counts.begin()); return cudf::detail::valid_if( diff --git a/cpp/include/cudf/detail/null_mask.hpp b/cpp/include/cudf/detail/null_mask.hpp index 67e3617d873..b8c52a4ae2c 100644 --- a/cpp/include/cudf/detail/null_mask.hpp +++ b/cpp/include/cudf/detail/null_mask.hpp @@ -18,10 +18,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/include/cudf/detail/quantiles.hpp b/cpp/include/cudf/detail/quantiles.hpp index 23d5fb73ba3..4f912077e59 100644 --- a/cpp/include/cudf/detail/quantiles.hpp +++ b/cpp/include/cudf/detail/quantiles.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace detail { diff --git a/cpp/include/cudf/detail/repeat.hpp b/cpp/include/cudf/detail/repeat.hpp index e17f1b7c5fd..81ac5bf2b14 100644 --- a/cpp/include/cudf/detail/repeat.hpp +++ b/cpp/include/cudf/detail/repeat.hpp @@ -18,9 +18,9 @@ #include #include +#include #include -#include #include diff --git a/cpp/include/cudf/detail/replace.hpp b/cpp/include/cudf/detail/replace.hpp index e2bd729861b..3b18b95ce75 100644 --- a/cpp/include/cudf/detail/replace.hpp +++ b/cpp/include/cudf/detail/replace.hpp @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include #include diff --git a/cpp/include/cudf/detail/reshape.hpp b/cpp/include/cudf/detail/reshape.hpp index 68a856373bf..aeeed282d8b 100644 --- a/cpp/include/cudf/detail/reshape.hpp +++ b/cpp/include/cudf/detail/reshape.hpp @@ -18,9 +18,9 @@ #include #include +#include #include -#include #include diff --git a/cpp/include/cudf/detail/rolling.hpp b/cpp/include/cudf/detail/rolling.hpp index 5bfa5679531..d8d5506969b 100644 --- a/cpp/include/cudf/detail/rolling.hpp +++ b/cpp/include/cudf/detail/rolling.hpp @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include #include diff --git a/cpp/include/cudf/detail/round.hpp b/cpp/include/cudf/detail/round.hpp index ba3ef1c1ce7..df1faf05dbd 100644 --- a/cpp/include/cudf/detail/round.hpp +++ b/cpp/include/cudf/detail/round.hpp @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace CUDF_EXPORT cudf { //! Inner interfaces and implementations diff --git a/cpp/include/cudf/detail/scan.hpp b/cpp/include/cudf/detail/scan.hpp index bd60309c5c3..313964a6341 100644 --- a/cpp/include/cudf/detail/scan.hpp +++ b/cpp/include/cudf/detail/scan.hpp @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace detail { diff --git a/cpp/include/cudf/detail/scatter.cuh b/cpp/include/cudf/detail/scatter.cuh index 80bc87731ca..fa93ce4e13c 100644 --- a/cpp/include/cudf/detail/scatter.cuh +++ b/cpp/include/cudf/detail/scatter.cuh @@ -30,12 +30,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -223,7 +223,7 @@ struct column_scatterer_impl { auto target_matched = dictionary::detail::add_keys(target, source.keys(), stream, mr); auto const target_view = dictionary_column_view(target_matched->view()); auto source_matched = dictionary::detail::set_keys( - source, target_view.keys(), stream, rmm::mr::get_current_device_resource()); + source, target_view.keys(), stream, cudf::get_current_device_resource_ref()); auto const source_view = dictionary_column_view(source_matched->view()); // now build the new indices by doing a scatter on just the matched indices diff --git a/cpp/include/cudf/detail/scatter.hpp b/cpp/include/cudf/detail/scatter.hpp index 6691ddc5c09..39f973bb611 100644 --- a/cpp/include/cudf/detail/scatter.hpp +++ b/cpp/include/cudf/detail/scatter.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/include/cudf/detail/search.hpp b/cpp/include/cudf/detail/search.hpp index 72e2cf074bc..da3b98660dc 100644 --- a/cpp/include/cudf/detail/search.hpp +++ b/cpp/include/cudf/detail/search.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace detail { diff --git a/cpp/include/cudf/detail/sequence.hpp b/cpp/include/cudf/detail/sequence.hpp index a08010a610f..41d9fe41080 100644 --- a/cpp/include/cudf/detail/sequence.hpp +++ b/cpp/include/cudf/detail/sequence.hpp @@ -19,16 +19,16 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace detail { /** * @copydoc cudf::sequence(size_type size, scalar const& init, scalar const& step, * rmm::device_async_resource_ref mr = - *rmm::mr::get_current_device_resource()) + *cudf::get_current_device_resource_ref()) * * @param stream CUDA stream used for device memory operations and kernel launches. */ @@ -41,7 +41,7 @@ std::unique_ptr sequence(size_type size, /** * @copydoc cudf::sequence(size_type size, scalar const& init, rmm::device_async_resource_ref mr = - rmm::mr::get_current_device_resource()) + cudf::get_current_device_resource_ref()) * * @param stream CUDA stream used for device memory operations and kernel launches. */ diff --git a/cpp/include/cudf/detail/sizes_to_offsets_iterator.cuh b/cpp/include/cudf/detail/sizes_to_offsets_iterator.cuh index 63e4fca8915..88ec0c07dc5 100644 --- a/cpp/include/cudf/detail/sizes_to_offsets_iterator.cuh +++ b/cpp/include/cudf/detail/sizes_to_offsets_iterator.cuh @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/detail/sorting.hpp b/cpp/include/cudf/detail/sorting.hpp index 08cf329f199..185855e1fc0 100644 --- a/cpp/include/cudf/detail/sorting.hpp +++ b/cpp/include/cudf/detail/sorting.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/include/cudf/detail/stream_compaction.hpp b/cpp/include/cudf/detail/stream_compaction.hpp index 85d2ee9790f..8a4366bdd63 100644 --- a/cpp/include/cudf/detail/stream_compaction.hpp +++ b/cpp/include/cudf/detail/stream_compaction.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace detail { diff --git a/cpp/include/cudf/detail/structs/utilities.hpp b/cpp/include/cudf/detail/structs/utilities.hpp index 7de68035b19..261c54afd51 100644 --- a/cpp/include/cudf/detail/structs/utilities.hpp +++ b/cpp/include/cudf/detail/structs/utilities.hpp @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include namespace CUDF_EXPORT cudf { namespace structs::detail { diff --git a/cpp/include/cudf/detail/tdigest/tdigest.hpp b/cpp/include/cudf/detail/tdigest/tdigest.hpp index 10eb3d389c7..80a4460023f 100644 --- a/cpp/include/cudf/detail/tdigest/tdigest.hpp +++ b/cpp/include/cudf/detail/tdigest/tdigest.hpp @@ -19,10 +19,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace tdigest::detail { diff --git a/cpp/include/cudf/detail/timezone.hpp b/cpp/include/cudf/detail/timezone.hpp index c7798ff60ed..5738f9ec8e9 100644 --- a/cpp/include/cudf/detail/timezone.hpp +++ b/cpp/include/cudf/detail/timezone.hpp @@ -17,9 +17,9 @@ #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace detail { @@ -34,7 +34,7 @@ std::unique_ptr
make_timezone_transition_table( std::optional tzif_dir, std::string_view timezone_name, rmm::cuda_stream_view stream, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); } // namespace detail } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/detail/transform.hpp b/cpp/include/cudf/detail/transform.hpp index 02849ef023c..4cfa95468f2 100644 --- a/cpp/include/cudf/detail/transform.hpp +++ b/cpp/include/cudf/detail/transform.hpp @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace detail { diff --git a/cpp/include/cudf/detail/transpose.hpp b/cpp/include/cudf/detail/transpose.hpp index 559b2c32996..22382fa0713 100644 --- a/cpp/include/cudf/detail/transpose.hpp +++ b/cpp/include/cudf/detail/transpose.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace detail { diff --git a/cpp/include/cudf/detail/unary.hpp b/cpp/include/cudf/detail/unary.hpp index bb05138bc8c..18b1e9b2d2e 100644 --- a/cpp/include/cudf/detail/unary.hpp +++ b/cpp/include/cudf/detail/unary.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/include/cudf/detail/utilities/host_memory.hpp b/cpp/include/cudf/detail/utilities/host_memory.hpp index c6775a950c9..c661faf1fbe 100644 --- a/cpp/include/cudf/detail/utilities/host_memory.hpp +++ b/cpp/include/cudf/detail/utilities/host_memory.hpp @@ -18,10 +18,9 @@ #include #include +#include #include -#include - #include namespace cudf::detail { diff --git a/cpp/include/cudf/detail/utilities/host_vector.hpp b/cpp/include/cudf/detail/utilities/host_vector.hpp index d4dd7b0d626..ecb8f910463 100644 --- a/cpp/include/cudf/detail/utilities/host_vector.hpp +++ b/cpp/include/cudf/detail/utilities/host_vector.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include #include @@ -33,7 +33,7 @@ namespace CUDF_EXPORT cudf { namespace detail { /*! \p rmm_host_allocator is a CUDA-specific host memory allocator - * that employs \c a `rmm::host_async_resource_ref` for allocation. + * that employs \c a `cudf::host_async_resource_ref` for allocation. * * \see https://en.cppreference.com/w/cpp/memory/allocator */ @@ -68,10 +68,10 @@ inline constexpr bool contains_property = (cuda::std::is_same_v || ... || false); /*! \p rmm_host_allocator is a CUDA-specific host memory allocator - * that employs \c `rmm::host_async_resource_ref` for allocation. + * that employs \c `cudf::host_async_resource_ref` for allocation. * * The \p rmm_host_allocator provides an interface for host memory allocation through the user - * provided \c `rmm::host_async_resource_ref`. The \p rmm_host_allocator does not take ownership of + * provided \c `cudf::host_async_resource_ref`. The \p rmm_host_allocator does not take ownership of * this reference and therefore it is the user's responsibility to ensure its lifetime for the * duration of the lifetime of the \p rmm_host_allocator. * diff --git a/cpp/include/cudf/detail/utilities/vector_factories.hpp b/cpp/include/cudf/detail/utilities/vector_factories.hpp index a9d91cdeee1..953ae5b9308 100644 --- a/cpp/include/cudf/detail/utilities/vector_factories.hpp +++ b/cpp/include/cudf/detail/utilities/vector_factories.hpp @@ -27,13 +27,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include diff --git a/cpp/include/cudf/detail/valid_if.cuh b/cpp/include/cudf/detail/valid_if.cuh index 56a2c76b741..cfb2e70bfed 100644 --- a/cpp/include/cudf/detail/valid_if.cuh +++ b/cpp/include/cudf/detail/valid_if.cuh @@ -22,10 +22,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/include/cudf/dictionary/detail/concatenate.hpp b/cpp/include/cudf/dictionary/detail/concatenate.hpp index 0eb17aa06f4..12f09616295 100644 --- a/cpp/include/cudf/dictionary/detail/concatenate.hpp +++ b/cpp/include/cudf/dictionary/detail/concatenate.hpp @@ -18,10 +18,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace dictionary::detail { diff --git a/cpp/include/cudf/dictionary/detail/encode.hpp b/cpp/include/cudf/dictionary/detail/encode.hpp index cc7ffbd397f..600ba8d6c67 100644 --- a/cpp/include/cudf/dictionary/detail/encode.hpp +++ b/cpp/include/cudf/dictionary/detail/encode.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace dictionary::detail { diff --git a/cpp/include/cudf/dictionary/detail/merge.hpp b/cpp/include/cudf/dictionary/detail/merge.hpp index a1777d412fe..69d0d9fa9b0 100644 --- a/cpp/include/cudf/dictionary/detail/merge.hpp +++ b/cpp/include/cudf/dictionary/detail/merge.hpp @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace dictionary::detail { diff --git a/cpp/include/cudf/dictionary/detail/replace.hpp b/cpp/include/cudf/dictionary/detail/replace.hpp index 1e1ee182fc5..c854e794b17 100644 --- a/cpp/include/cudf/dictionary/detail/replace.hpp +++ b/cpp/include/cudf/dictionary/detail/replace.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace dictionary::detail { diff --git a/cpp/include/cudf/dictionary/detail/search.hpp b/cpp/include/cudf/dictionary/detail/search.hpp index 921acc258a9..09907c9070d 100644 --- a/cpp/include/cudf/dictionary/detail/search.hpp +++ b/cpp/include/cudf/dictionary/detail/search.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace dictionary { diff --git a/cpp/include/cudf/dictionary/detail/update_keys.hpp b/cpp/include/cudf/dictionary/detail/update_keys.hpp index 9eb812eb8ee..0848df64596 100644 --- a/cpp/include/cudf/dictionary/detail/update_keys.hpp +++ b/cpp/include/cudf/dictionary/detail/update_keys.hpp @@ -19,10 +19,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace dictionary::detail { diff --git a/cpp/include/cudf/dictionary/dictionary_factories.hpp b/cpp/include/cudf/dictionary/dictionary_factories.hpp index 2f663c4af61..4a63ee05479 100644 --- a/cpp/include/cudf/dictionary/dictionary_factories.hpp +++ b/cpp/include/cudf/dictionary/dictionary_factories.hpp @@ -18,10 +18,9 @@ #include #include #include +#include #include -#include -#include namespace CUDF_EXPORT cudf { /** @@ -67,7 +66,7 @@ std::unique_ptr make_dictionary_column( column_view const& keys_column, column_view const& indices_column, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a dictionary column by taking ownership of the provided keys @@ -97,7 +96,7 @@ std::unique_ptr make_dictionary_column( rmm::device_buffer&& null_mask, size_type null_count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a dictionary column by taking ownership of the provided keys @@ -124,7 +123,7 @@ std::unique_ptr make_dictionary_column( std::unique_ptr keys_column, std::unique_ptr indices_column, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/dictionary/encode.hpp b/cpp/include/cudf/dictionary/encode.hpp index 9e68c947793..dc81fd74992 100644 --- a/cpp/include/cudf/dictionary/encode.hpp +++ b/cpp/include/cudf/dictionary/encode.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace dictionary { @@ -62,7 +60,7 @@ std::unique_ptr encode( column_view const& column, data_type indices_type = data_type{type_id::UINT32}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a column by gathering the keys from the provided @@ -82,7 +80,7 @@ std::unique_ptr encode( std::unique_ptr decode( dictionary_column_view const& dictionary_column, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace dictionary diff --git a/cpp/include/cudf/dictionary/search.hpp b/cpp/include/cudf/dictionary/search.hpp index 66275de33e9..16d59318dd0 100644 --- a/cpp/include/cudf/dictionary/search.hpp +++ b/cpp/include/cudf/dictionary/search.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace dictionary { @@ -46,7 +44,7 @@ std::unique_ptr get_index( dictionary_column_view const& dictionary, scalar const& key, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace dictionary diff --git a/cpp/include/cudf/dictionary/update_keys.hpp b/cpp/include/cudf/dictionary/update_keys.hpp index c02e91f8d78..85e5af8cf22 100644 --- a/cpp/include/cudf/dictionary/update_keys.hpp +++ b/cpp/include/cudf/dictionary/update_keys.hpp @@ -17,11 +17,9 @@ #include #include +#include #include -#include -#include - namespace CUDF_EXPORT cudf { namespace dictionary { /** @@ -61,7 +59,7 @@ std::unique_ptr add_keys( dictionary_column_view const& dictionary_column, column_view const& new_keys, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a new dictionary column by removing the specified keys @@ -93,7 +91,7 @@ std::unique_ptr remove_keys( dictionary_column_view const& dictionary_column, column_view const& keys_to_remove, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a new dictionary column by removing any keys @@ -115,7 +113,7 @@ std::unique_ptr remove_keys( std::unique_ptr remove_unused_keys( dictionary_column_view const& dictionary_column, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a new dictionary column by applying only the specified keys @@ -149,7 +147,7 @@ std::unique_ptr set_keys( dictionary_column_view const& dictionary_column, column_view const& keys, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create new dictionaries that have keys merged from the input dictionaries. @@ -165,7 +163,7 @@ std::unique_ptr set_keys( std::vector> match_dictionaries( cudf::host_span input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace dictionary diff --git a/cpp/include/cudf/filling.hpp b/cpp/include/cudf/filling.hpp index 054f1e859f4..15a21b44f3b 100644 --- a/cpp/include/cudf/filling.hpp +++ b/cpp/include/cudf/filling.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -94,7 +92,7 @@ std::unique_ptr fill( size_type end, scalar const& value, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Repeat rows of a Table. @@ -128,7 +126,7 @@ std::unique_ptr
repeat( table_view const& input_table, column_view const& count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Repeat rows of a Table. @@ -153,7 +151,7 @@ std::unique_ptr
repeat( table_view const& input_table, size_type count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Fills a column with a sequence of value specified by an initial value and a step. @@ -184,7 +182,7 @@ std::unique_ptr sequence( scalar const& init, scalar const& step, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Fills a column with a sequence of value specified by an initial value and a step of 1. @@ -211,7 +209,7 @@ std::unique_ptr sequence( size_type size, scalar const& init, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generate a sequence of timestamps beginning at `init` and incrementing by `months` for @@ -242,7 +240,7 @@ std::unique_ptr calendrical_month_sequence( scalar const& init, size_type months, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/groupby.hpp b/cpp/include/cudf/groupby.hpp index f7df9c1aa9b..11c778408fe 100644 --- a/cpp/include/cudf/groupby.hpp +++ b/cpp/include/cudf/groupby.hpp @@ -22,11 +22,10 @@ #include #include #include +#include #include #include -#include -#include #include #include @@ -186,7 +185,7 @@ class groupby { */ std::pair, std::vector> aggregate( host_span requests, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @copydoc aggregate(host_span, rmm::device_async_resource_ref) @@ -196,7 +195,7 @@ class groupby { std::pair, std::vector> aggregate( host_span requests, rmm::cuda_stream_view stream, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs grouped scans on the specified values. * @@ -250,7 +249,7 @@ class groupby { */ std::pair, std::vector> scan( host_span requests, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs grouped shifts for specified values. @@ -306,7 +305,7 @@ class groupby { table_view const& values, host_span offsets, std::vector> const& fill_values, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief The grouped data corresponding to a groupby operation on a set of values. @@ -335,7 +334,7 @@ class groupby { * @return A `groups` object representing grouped keys and values */ groups get_groups(cudf::table_view values = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs grouped replace nulls on @p value @@ -375,7 +374,7 @@ class groupby { std::pair, std::unique_ptr
> replace_nulls( table_view const& values, host_span replace_policies, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); private: table_view _keys; ///< Keys that determine grouping diff --git a/cpp/include/cudf/hashing.hpp b/cpp/include/cudf/hashing.hpp index b8be2af6967..0c5327edb91 100644 --- a/cpp/include/cudf/hashing.hpp +++ b/cpp/include/cudf/hashing.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { @@ -62,7 +60,7 @@ std::unique_ptr murmurhash3_x86_32( table_view const& input, uint32_t seed = DEFAULT_HASH_SEED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the MurmurHash3 64-bit hash value of each row in the given table @@ -81,7 +79,7 @@ std::unique_ptr
murmurhash3_x64_128( table_view const& input, uint64_t seed = DEFAULT_HASH_SEED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the MD5 hash value of each row in the given table @@ -95,7 +93,7 @@ std::unique_ptr
murmurhash3_x64_128( std::unique_ptr md5( table_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the SHA-1 hash value of each row in the given table @@ -109,7 +107,7 @@ std::unique_ptr md5( std::unique_ptr sha1( table_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the SHA-224 hash value of each row in the given table @@ -123,7 +121,7 @@ std::unique_ptr sha1( std::unique_ptr sha224( table_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the SHA-256 hash value of each row in the given table @@ -137,7 +135,7 @@ std::unique_ptr sha224( std::unique_ptr sha256( table_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the SHA-384 hash value of each row in the given table @@ -151,7 +149,7 @@ std::unique_ptr sha256( std::unique_ptr sha384( table_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the SHA-512 hash value of each row in the given table @@ -165,7 +163,7 @@ std::unique_ptr sha384( std::unique_ptr sha512( table_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the XXHash_64 hash value of each row in the given table @@ -183,7 +181,7 @@ std::unique_ptr xxhash_64( table_view const& input, uint64_t seed = DEFAULT_HASH_SEED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); } // namespace hashing diff --git a/cpp/include/cudf/hashing/detail/hashing.hpp b/cpp/include/cudf/hashing/detail/hashing.hpp index 1a459430346..a978e54a1b9 100644 --- a/cpp/include/cudf/hashing/detail/hashing.hpp +++ b/cpp/include/cudf/hashing/detail/hashing.hpp @@ -17,9 +17,9 @@ #include #include +#include #include -#include #include #include diff --git a/cpp/include/cudf/interop.hpp b/cpp/include/cudf/interop.hpp index 0f52b0f7b31..f789d950e51 100644 --- a/cpp/include/cudf/interop.hpp +++ b/cpp/include/cudf/interop.hpp @@ -22,11 +22,9 @@ #include #include #include +#include #include -#include -#include - #include struct DLManagedTensor; @@ -65,7 +63,7 @@ namespace CUDF_EXPORT cudf { */ std::unique_ptr
from_dlpack( DLManagedTensor const* managed_tensor, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Convert a cudf table into a DLPack DLTensor @@ -87,7 +85,7 @@ std::unique_ptr
from_dlpack( */ DLManagedTensor* to_dlpack( table_view const& input, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group @@ -173,7 +171,7 @@ unique_schema_t to_arrow_schema(cudf::table_view const& input, unique_device_array_t to_arrow_device( cudf::table&& table, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create `ArrowDeviceArray` from cudf column and metadata @@ -202,7 +200,7 @@ unique_device_array_t to_arrow_device( unique_device_array_t to_arrow_device( cudf::column&& col, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create `ArrowDeviceArray` from a table view @@ -234,7 +232,7 @@ unique_device_array_t to_arrow_device( unique_device_array_t to_arrow_device( cudf::table_view const& table, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create `ArrowDeviceArray` from a column view @@ -266,7 +264,7 @@ unique_device_array_t to_arrow_device( unique_device_array_t to_arrow_device( cudf::column_view const& col, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Copy table view data to host and create `ArrowDeviceArray` for it @@ -291,7 +289,7 @@ unique_device_array_t to_arrow_device( unique_device_array_t to_arrow_host( cudf::table_view const& table, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Copy column view data to host and create `ArrowDeviceArray` for it @@ -316,7 +314,7 @@ unique_device_array_t to_arrow_host( unique_device_array_t to_arrow_host( cudf::column_view const& col, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create `cudf::table` from given ArrowArray and ArrowSchema input @@ -337,7 +335,7 @@ std::unique_ptr from_arrow( ArrowSchema const* schema, ArrowArray const* input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create `cudf::column` from a given ArrowArray and ArrowSchema input @@ -356,7 +354,7 @@ std::unique_ptr from_arrow_column( ArrowSchema const* schema, ArrowArray const* input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create `cudf::table` from given ArrowDeviceArray input @@ -380,7 +378,7 @@ std::unique_ptr
from_arrow_host( ArrowSchema const* schema, ArrowDeviceArray const* input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create `cudf::table` from given ArrowArrayStream input @@ -398,7 +396,7 @@ std::unique_ptr
from_arrow_host( std::unique_ptr
from_arrow_stream( ArrowArrayStream* input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create `cudf::column` from given ArrowDeviceArray input @@ -421,7 +419,7 @@ std::unique_ptr from_arrow_host_column( ArrowSchema const* schema, ArrowDeviceArray const* input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief typedef for a vector of owning columns, used for conversion from ArrowDeviceArray @@ -502,7 +500,7 @@ unique_table_view_t from_arrow_device( ArrowSchema const* schema, ArrowDeviceArray const* input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief typedef for a unique_ptr to a `cudf::column_view` with custom deleter @@ -545,7 +543,7 @@ unique_column_view_t from_arrow_device_column( ArrowSchema const* schema, ArrowDeviceArray const* input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/io/avro.hpp b/cpp/include/cudf/io/avro.hpp index 63f9ea3a624..b307d05c09d 100644 --- a/cpp/include/cudf/io/avro.hpp +++ b/cpp/include/cudf/io/avro.hpp @@ -20,9 +20,7 @@ #include #include - -#include -#include +#include #include #include @@ -217,7 +215,7 @@ class avro_reader_options_builder { */ table_with_metadata read_avro( avro_reader_options const& options, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace io diff --git a/cpp/include/cudf/io/csv.hpp b/cpp/include/cudf/io/csv.hpp index bbb4636a5a3..dae056ef157 100644 --- a/cpp/include/cudf/io/csv.hpp +++ b/cpp/include/cudf/io/csv.hpp @@ -20,9 +20,7 @@ #include #include #include - -#include -#include +#include #include #include @@ -1354,7 +1352,7 @@ class csv_reader_options_builder { table_with_metadata read_csv( csv_reader_options options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group /** diff --git a/cpp/include/cudf/io/detail/avro.hpp b/cpp/include/cudf/io/detail/avro.hpp index 13f695d6866..ab6cb422296 100644 --- a/cpp/include/cudf/io/detail/avro.hpp +++ b/cpp/include/cudf/io/detail/avro.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace io::detail::avro { diff --git a/cpp/include/cudf/io/detail/batched_memset.hpp b/cpp/include/cudf/io/detail/batched_memset.hpp index d0922cc64ee..1c74be4a9fe 100644 --- a/cpp/include/cudf/io/detail/batched_memset.hpp +++ b/cpp/include/cudf/io/detail/batched_memset.hpp @@ -16,10 +16,10 @@ #include #include +#include #include #include -#include #include #include @@ -50,7 +50,7 @@ void batched_memset(std::vector> const& bufs, // copy bufs into device memory and then get sizes auto gpu_bufs = - cudf::detail::make_device_uvector_async(bufs, stream, rmm::mr::get_current_device_resource()); + cudf::detail::make_device_uvector_async(bufs, stream, cudf::get_current_device_resource_ref()); // get a vector with the sizes of all buffers auto sizes = cudf::detail::make_counting_transform_iterator( @@ -72,7 +72,7 @@ void batched_memset(std::vector> const& bufs, cub::DeviceCopy::Batched(nullptr, temp_storage_bytes, iter_in, iter_out, sizes, num_bufs, stream); rmm::device_buffer d_temp_storage( - temp_storage_bytes, stream, rmm::mr::get_current_device_resource()); + temp_storage_bytes, stream, cudf::get_current_device_resource_ref()); cub::DeviceCopy::Batched( d_temp_storage.data(), temp_storage_bytes, iter_in, iter_out, sizes, num_bufs, stream); diff --git a/cpp/include/cudf/io/detail/csv.hpp b/cpp/include/cudf/io/detail/csv.hpp index d4cad2f70fd..409663938a9 100644 --- a/cpp/include/cudf/io/detail/csv.hpp +++ b/cpp/include/cudf/io/detail/csv.hpp @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace io::detail::csv { diff --git a/cpp/include/cudf/io/detail/json.hpp b/cpp/include/cudf/io/detail/json.hpp index 38ba4f675c3..73ff17b2b93 100644 --- a/cpp/include/cudf/io/detail/json.hpp +++ b/cpp/include/cudf/io/detail/json.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace io::json::detail { diff --git a/cpp/include/cudf/io/detail/orc.hpp b/cpp/include/cudf/io/detail/orc.hpp index 7538cf7d29c..4a240d76696 100644 --- a/cpp/include/cudf/io/detail/orc.hpp +++ b/cpp/include/cudf/io/detail/orc.hpp @@ -22,9 +22,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/include/cudf/io/detail/parquet.hpp b/cpp/include/cudf/io/detail/parquet.hpp index a6945e0b7ab..1528ac0124a 100644 --- a/cpp/include/cudf/io/detail/parquet.hpp +++ b/cpp/include/cudf/io/detail/parquet.hpp @@ -25,10 +25,9 @@ #include #include #include +#include #include -#include -#include #include #include diff --git a/cpp/include/cudf/io/detail/tokenize_json.hpp b/cpp/include/cudf/io/detail/tokenize_json.hpp index 715eb855daa..a5b5caf300f 100644 --- a/cpp/include/cudf/io/detail/tokenize_json.hpp +++ b/cpp/include/cudf/io/detail/tokenize_json.hpp @@ -18,11 +18,11 @@ #include #include +#include #include #include #include -#include namespace cudf::io::json { diff --git a/cpp/include/cudf/io/json.hpp b/cpp/include/cudf/io/json.hpp index fde1857cb7f..a3d6533705e 100644 --- a/cpp/include/cudf/io/json.hpp +++ b/cpp/include/cudf/io/json.hpp @@ -20,9 +20,7 @@ #include #include - -#include -#include +#include #include #include @@ -675,7 +673,7 @@ class json_reader_options_builder { table_with_metadata read_json( json_reader_options options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group diff --git a/cpp/include/cudf/io/orc.hpp b/cpp/include/cudf/io/orc.hpp index 8d484b15872..163fa20806d 100644 --- a/cpp/include/cudf/io/orc.hpp +++ b/cpp/include/cudf/io/orc.hpp @@ -21,9 +21,7 @@ #include #include #include - -#include -#include +#include #include #include @@ -409,7 +407,7 @@ class orc_reader_options_builder { table_with_metadata read_orc( orc_reader_options const& options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief The chunked orc reader class to read an ORC file iteratively into a series of @@ -479,7 +477,7 @@ class chunked_orc_reader { size_type output_row_granularity, orc_reader_options const& options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct the reader from input/output size limits along with other ORC reader options. @@ -500,7 +498,7 @@ class chunked_orc_reader { std::size_t pass_read_limit, orc_reader_options const& options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct the reader from output size limits along with other ORC reader options. @@ -518,7 +516,7 @@ class chunked_orc_reader { std::size_t chunk_read_limit, orc_reader_options const& options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Destructor, destroying the internal reader instance. diff --git a/cpp/include/cudf/io/parquet.hpp b/cpp/include/cudf/io/parquet.hpp index 64c37f9a9df..ed7b2ac0850 100644 --- a/cpp/include/cudf/io/parquet.hpp +++ b/cpp/include/cudf/io/parquet.hpp @@ -22,9 +22,7 @@ #include #include #include - -#include -#include +#include #include #include @@ -502,7 +500,7 @@ class parquet_reader_options_builder { table_with_metadata read_parquet( parquet_reader_options const& options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief The chunked parquet reader class to read Parquet file iteratively in to a series of @@ -540,7 +538,7 @@ class chunked_parquet_reader { std::size_t chunk_read_limit, parquet_reader_options const& options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Constructor for chunked reader. @@ -566,7 +564,7 @@ class chunked_parquet_reader { std::size_t pass_read_limit, parquet_reader_options const& options, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Destructor, destroying the internal reader instance. diff --git a/cpp/include/cudf/io/text/detail/trie.hpp b/cpp/include/cudf/io/text/detail/trie.hpp index eee3fefc79f..70e06eeac93 100644 --- a/cpp/include/cudf/io/text/detail/trie.hpp +++ b/cpp/include/cudf/io/text/detail/trie.hpp @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/cpp/include/cudf/io/text/multibyte_split.hpp b/cpp/include/cudf/io/text/multibyte_split.hpp index 3a1f9611324..99f9e7534ac 100644 --- a/cpp/include/cudf/io/text/multibyte_split.hpp +++ b/cpp/include/cudf/io/text/multibyte_split.hpp @@ -19,10 +19,9 @@ #include #include #include +#include #include -#include -#include #include #include @@ -94,7 +93,7 @@ std::unique_ptr multibyte_split( std::string const& delimiter, parse_options options = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group diff --git a/cpp/include/cudf/join.hpp b/cpp/include/cudf/join.hpp index f4139721475..cc8912cb022 100644 --- a/cpp/include/cudf/join.hpp +++ b/cpp/include/cudf/join.hpp @@ -22,12 +22,11 @@ #include #include #include +#include #include #include #include -#include -#include #include #include @@ -109,7 +108,7 @@ std::pair>, inner_join(cudf::table_view const& left_keys, cudf::table_view const& right_keys, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a pair of row index vectors corresponding to a @@ -149,7 +148,7 @@ std::pair>, left_join(cudf::table_view const& left_keys, cudf::table_view const& right_keys, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a pair of row index vectors corresponding to a @@ -188,7 +187,7 @@ std::pair>, full_join(cudf::table_view const& left_keys, cudf::table_view const& right_keys, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a vector of row indices corresponding to a left semi-join @@ -216,7 +215,7 @@ std::unique_ptr> left_semi_join( cudf::table_view const& left_keys, cudf::table_view const& right_keys, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a vector of row indices corresponding to a left anti join @@ -247,7 +246,7 @@ std::unique_ptr> left_anti_join( cudf::table_view const& left_keys, cudf::table_view const& right_keys, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a cross join on two tables (`left`, `right`) @@ -274,7 +273,7 @@ std::unique_ptr> left_anti_join( std::unique_ptr cross_join( cudf::table_view const& left, cudf::table_view const& right, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief The enum class to specify if any of the input join tables (`build` table and any later @@ -353,7 +352,7 @@ class hash_join { inner_join(cudf::table_view const& probe, std::optional output_size = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; /** * Returns the row indices that can be used to construct the result of performing @@ -378,7 +377,7 @@ class hash_join { left_join(cudf::table_view const& probe, std::optional output_size = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; /** * Returns the row indices that can be used to construct the result of performing @@ -403,7 +402,7 @@ class hash_join { full_join(cudf::table_view const& probe, std::optional output_size = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; /** * Returns the exact number of matches (rows) when performing an inner join with the specified @@ -455,7 +454,7 @@ class hash_join { [[nodiscard]] std::size_t full_join_size( cudf::table_view const& probe, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; private: const std::unique_ptr _impl; @@ -511,7 +510,7 @@ class distinct_hash_join { [[nodiscard]] std::pair>, std::unique_ptr>> inner_join(rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; /** * @brief Returns the build table indices that can be used to construct the result of performing @@ -530,7 +529,7 @@ class distinct_hash_join { */ [[nodiscard]] std::unique_ptr> left_join( rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; private: using impl_type = typename cudf::detail::distinct_hash_join; ///< Implementation type @@ -579,7 +578,7 @@ conditional_inner_join(table_view const& left, table_view const& right, ast::expression const& binary_predicate, std::optional output_size = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a pair of row index vectors corresponding to all pairs @@ -624,7 +623,7 @@ conditional_left_join(table_view const& left, table_view const& right, ast::expression const& binary_predicate, std::optional output_size = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a pair of row index vectors corresponding to all pairs @@ -666,7 +665,7 @@ std::pair>, conditional_full_join(table_view const& left, table_view const& right, ast::expression const& binary_predicate, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns an index vector corresponding to all rows in the left table @@ -705,7 +704,7 @@ std::unique_ptr> conditional_left_semi_join( table_view const& right, ast::expression const& binary_predicate, std::optional output_size = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns an index vector corresponding to all rows in the left table @@ -744,7 +743,7 @@ std::unique_ptr> conditional_left_anti_join( table_view const& right, ast::expression const& binary_predicate, std::optional output_size = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a pair of row index vectors corresponding to all pairs of @@ -802,7 +801,7 @@ mixed_inner_join( ast::expression const& binary_predicate, null_equality compare_nulls = null_equality::EQUAL, std::optional>> output_size_data = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a pair of row index vectors corresponding to all pairs of @@ -862,7 +861,7 @@ mixed_left_join( ast::expression const& binary_predicate, null_equality compare_nulls = null_equality::EQUAL, std::optional>> output_size_data = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a pair of row index vectors corresponding to all pairs of @@ -922,7 +921,7 @@ mixed_full_join( ast::expression const& binary_predicate, null_equality compare_nulls = null_equality::EQUAL, std::optional>> output_size_data = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns an index vector corresponding to all rows in the left tables @@ -969,7 +968,7 @@ std::unique_ptr> mixed_left_semi_join( table_view const& right_conditional, ast::expression const& binary_predicate, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns an index vector corresponding to all rows in the left tables @@ -1017,7 +1016,7 @@ std::unique_ptr> mixed_left_anti_join( table_view const& right_conditional, ast::expression const& binary_predicate, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the exact number of matches (rows) when performing a @@ -1057,7 +1056,7 @@ std::pair>> mixed_in table_view const& right_conditional, ast::expression const& binary_predicate, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the exact number of matches (rows) when performing a @@ -1097,7 +1096,7 @@ std::pair>> mixed_le table_view const& right_conditional, ast::expression const& binary_predicate, null_equality compare_nulls = null_equality::EQUAL, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the exact number of matches (rows) when performing a @@ -1120,7 +1119,7 @@ std::size_t conditional_inner_join_size( table_view const& left, table_view const& right, ast::expression const& binary_predicate, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the exact number of matches (rows) when performing a @@ -1143,7 +1142,7 @@ std::size_t conditional_left_join_size( table_view const& left, table_view const& right, ast::expression const& binary_predicate, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the exact number of matches (rows) when performing a @@ -1166,7 +1165,7 @@ std::size_t conditional_left_semi_join_size( table_view const& left, table_view const& right, ast::expression const& binary_predicate, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the exact number of matches (rows) when performing a @@ -1189,6 +1188,6 @@ std::size_t conditional_left_anti_join_size( table_view const& left, table_view const& right, ast::expression const& binary_predicate, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/json/json.hpp b/cpp/include/cudf/json/json.hpp index 403374c536d..2ad3421d27d 100644 --- a/cpp/include/cudf/json/json.hpp +++ b/cpp/include/cudf/json/json.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { @@ -169,7 +167,7 @@ std::unique_ptr get_json_object( cudf::string_scalar const& json_path, get_json_object_options options = get_json_object_options{}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/labeling/label_bins.hpp b/cpp/include/cudf/labeling/label_bins.hpp index 7eb25134ca5..1d0ead35d96 100644 --- a/cpp/include/cudf/labeling/label_bins.hpp +++ b/cpp/include/cudf/labeling/label_bins.hpp @@ -19,10 +19,9 @@ #include #include #include +#include #include -#include -#include namespace CUDF_EXPORT cudf { @@ -76,7 +75,7 @@ std::unique_ptr label_bins( column_view const& right_edges, inclusive right_inclusive, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/lists/combine.hpp b/cpp/include/cudf/lists/combine.hpp index 5a310e6651f..fd2f42cf649 100644 --- a/cpp/include/cudf/lists/combine.hpp +++ b/cpp/include/cudf/lists/combine.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { @@ -68,7 +66,7 @@ std::unique_ptr concatenate_rows( table_view const& input, concatenate_null_policy null_policy = concatenate_null_policy::IGNORE, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Concatenating multiple lists on the same row of a lists column into a single list. @@ -99,7 +97,7 @@ std::unique_ptr concatenate_list_elements( column_view const& input, concatenate_null_policy null_policy = concatenate_null_policy::IGNORE, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace lists diff --git a/cpp/include/cudf/lists/contains.hpp b/cpp/include/cudf/lists/contains.hpp index cd0a216488c..e498c60682e 100644 --- a/cpp/include/cudf/lists/contains.hpp +++ b/cpp/include/cudf/lists/contains.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace lists { @@ -52,7 +50,7 @@ std::unique_ptr contains( cudf::lists_column_view const& lists, cudf::scalar const& search_key, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a column of `bool` values indicating whether the list rows of the first @@ -76,7 +74,7 @@ std::unique_ptr contains( cudf::lists_column_view const& lists, cudf::column_view const& search_keys, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a column of `bool` values indicating whether each row in the `lists` column @@ -98,7 +96,7 @@ std::unique_ptr contains( std::unique_ptr contains_nulls( cudf::lists_column_view const& lists, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Option to choose whether `index_of()` returns the first or last match @@ -142,7 +140,7 @@ std::unique_ptr index_of( cudf::scalar const& search_key, duplicate_find_option find_option = duplicate_find_option::FIND_FIRST, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a column of values indicating the position of a search key @@ -179,7 +177,7 @@ std::unique_ptr index_of( cudf::column_view const& search_keys, duplicate_find_option find_option = duplicate_find_option::FIND_FIRST, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace lists diff --git a/cpp/include/cudf/lists/count_elements.hpp b/cpp/include/cudf/lists/count_elements.hpp index a6f2ea6e68a..e7d50f11099 100644 --- a/cpp/include/cudf/lists/count_elements.hpp +++ b/cpp/include/cudf/lists/count_elements.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace lists { @@ -54,7 +52,7 @@ namespace lists { std::unique_ptr count_elements( lists_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of lists_elements group diff --git a/cpp/include/cudf/lists/detail/combine.hpp b/cpp/include/cudf/lists/detail/combine.hpp index 07309da2814..ee7a6a465c3 100644 --- a/cpp/include/cudf/lists/detail/combine.hpp +++ b/cpp/include/cudf/lists/detail/combine.hpp @@ -18,8 +18,7 @@ #include #include #include - -#include +#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/concatenate.hpp b/cpp/include/cudf/lists/detail/concatenate.hpp index edfa3355dcd..d3a3a48dbb2 100644 --- a/cpp/include/cudf/lists/detail/concatenate.hpp +++ b/cpp/include/cudf/lists/detail/concatenate.hpp @@ -19,10 +19,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/contains.hpp b/cpp/include/cudf/lists/detail/contains.hpp index 1ca3651b55a..9d30ef90723 100644 --- a/cpp/include/cudf/lists/detail/contains.hpp +++ b/cpp/include/cudf/lists/detail/contains.hpp @@ -17,8 +17,7 @@ #include #include - -#include +#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/copying.hpp b/cpp/include/cudf/lists/detail/copying.hpp index 76154ae7064..04e6b18cd27 100644 --- a/cpp/include/cudf/lists/detail/copying.hpp +++ b/cpp/include/cudf/lists/detail/copying.hpp @@ -16,9 +16,9 @@ #pragma once #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/extract.hpp b/cpp/include/cudf/lists/detail/extract.hpp index e14b93ff912..7448f513788 100644 --- a/cpp/include/cudf/lists/detail/extract.hpp +++ b/cpp/include/cudf/lists/detail/extract.hpp @@ -17,8 +17,7 @@ #include #include - -#include +#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/gather.cuh b/cpp/include/cudf/lists/detail/gather.cuh index 294282d7caa..31b18c90c68 100644 --- a/cpp/include/cudf/lists/detail/gather.cuh +++ b/cpp/include/cudf/lists/detail/gather.cuh @@ -22,11 +22,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/lists/detail/interleave_columns.hpp b/cpp/include/cudf/lists/detail/interleave_columns.hpp index ae8caa853f3..ebf554f0964 100644 --- a/cpp/include/cudf/lists/detail/interleave_columns.hpp +++ b/cpp/include/cudf/lists/detail/interleave_columns.hpp @@ -17,9 +17,9 @@ #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/lists_column_factories.hpp b/cpp/include/cudf/lists/detail/lists_column_factories.hpp index 18d66f15b1e..b726264aa65 100644 --- a/cpp/include/cudf/lists/detail/lists_column_factories.hpp +++ b/cpp/include/cudf/lists/detail/lists_column_factories.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/reverse.hpp b/cpp/include/cudf/lists/detail/reverse.hpp index d10d7784e6c..a5a86f4d44d 100644 --- a/cpp/include/cudf/lists/detail/reverse.hpp +++ b/cpp/include/cudf/lists/detail/reverse.hpp @@ -17,8 +17,7 @@ #include #include - -#include +#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/scatter.cuh b/cpp/include/cudf/lists/detail/scatter.cuh index be76e456900..51f2fa3cd23 100644 --- a/cpp/include/cudf/lists/detail/scatter.cuh +++ b/cpp/include/cudf/lists/detail/scatter.cuh @@ -26,11 +26,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/lists/detail/scatter_helper.cuh b/cpp/include/cudf/lists/detail/scatter_helper.cuh index fc44e0bc290..49678c97554 100644 --- a/cpp/include/cudf/lists/detail/scatter_helper.cuh +++ b/cpp/include/cudf/lists/detail/scatter_helper.cuh @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/include/cudf/lists/detail/set_operations.hpp b/cpp/include/cudf/lists/detail/set_operations.hpp index abfcef72d47..51293969e58 100644 --- a/cpp/include/cudf/lists/detail/set_operations.hpp +++ b/cpp/include/cudf/lists/detail/set_operations.hpp @@ -19,10 +19,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/sorting.hpp b/cpp/include/cudf/lists/detail/sorting.hpp index 8cbfbbae769..748fb7acfee 100644 --- a/cpp/include/cudf/lists/detail/sorting.hpp +++ b/cpp/include/cudf/lists/detail/sorting.hpp @@ -16,9 +16,9 @@ #pragma once #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/stream_compaction.hpp b/cpp/include/cudf/lists/detail/stream_compaction.hpp index be0bd27083c..fa7c0c173d2 100644 --- a/cpp/include/cudf/lists/detail/stream_compaction.hpp +++ b/cpp/include/cudf/lists/detail/stream_compaction.hpp @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/explode.hpp b/cpp/include/cudf/lists/explode.hpp index a3375887815..23745e8a443 100644 --- a/cpp/include/cudf/lists/explode.hpp +++ b/cpp/include/cudf/lists/explode.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -75,7 +73,7 @@ std::unique_ptr
explode( table_view const& input_table, size_type explode_column_idx, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Explodes a list column's elements and includes a position column. @@ -121,7 +119,7 @@ std::unique_ptr
explode_position( table_view const& input_table, size_type explode_column_idx, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Explodes a list column's elements retaining any null entries or empty lists inside. @@ -165,7 +163,7 @@ std::unique_ptr
explode_outer( table_view const& input_table, size_type explode_column_idx, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Explodes a list column's elements retaining any null entries or empty lists and includes a @@ -211,7 +209,7 @@ std::unique_ptr
explode_outer_position( table_view const& input_table, size_type explode_column_idx, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/extract.hpp b/cpp/include/cudf/lists/extract.hpp index 29a02308c66..f584dff6bed 100644 --- a/cpp/include/cudf/lists/extract.hpp +++ b/cpp/include/cudf/lists/extract.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace lists { @@ -69,7 +67,7 @@ std::unique_ptr extract_list_element( lists_column_view const& lists_column, size_type index, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a column where each row is a single element from the corresponding sublist @@ -110,7 +108,7 @@ std::unique_ptr extract_list_element( lists_column_view const& lists_column, column_view const& indices, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace lists diff --git a/cpp/include/cudf/lists/filling.hpp b/cpp/include/cudf/lists/filling.hpp index a1f3c37ad9e..d887a844aba 100644 --- a/cpp/include/cudf/lists/filling.hpp +++ b/cpp/include/cudf/lists/filling.hpp @@ -18,10 +18,9 @@ #include #include +#include #include -#include -#include #include @@ -69,7 +68,7 @@ std::unique_ptr sequences( column_view const& starts, column_view const& sizes, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a lists column in which each row contains a sequence of values specified by a tuple @@ -111,7 +110,7 @@ std::unique_ptr sequences( column_view const& steps, column_view const& sizes, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace lists diff --git a/cpp/include/cudf/lists/gather.hpp b/cpp/include/cudf/lists/gather.hpp index 6359e0488c9..3e3c09cfea1 100644 --- a/cpp/include/cudf/lists/gather.hpp +++ b/cpp/include/cudf/lists/gather.hpp @@ -20,9 +20,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace lists { @@ -77,7 +75,7 @@ std::unique_ptr segmented_gather( lists_column_view const& gather_map_list, out_of_bounds_policy bounds_policy = out_of_bounds_policy::DONT_CHECK, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace lists diff --git a/cpp/include/cudf/lists/reverse.hpp b/cpp/include/cudf/lists/reverse.hpp index f00e6e5117a..0c99dcbe8ae 100644 --- a/cpp/include/cudf/lists/reverse.hpp +++ b/cpp/include/cudf/lists/reverse.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include #include @@ -52,7 +50,7 @@ namespace lists { std::unique_ptr reverse( lists_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/lists/set_operations.hpp b/cpp/include/cudf/lists/set_operations.hpp index 55b1591fc44..f8ea972528c 100644 --- a/cpp/include/cudf/lists/set_operations.hpp +++ b/cpp/include/cudf/lists/set_operations.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace lists { @@ -64,7 +64,7 @@ std::unique_ptr have_overlap( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a lists column of distinct elements common to two input lists columns. @@ -101,7 +101,7 @@ std::unique_ptr intersect_distinct( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a lists column of distinct elements found in either of two input lists columns. @@ -138,7 +138,7 @@ std::unique_ptr union_distinct( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a lists column of distinct elements found only in the left input column. @@ -175,7 +175,7 @@ std::unique_ptr difference_distinct( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace lists diff --git a/cpp/include/cudf/lists/sorting.hpp b/cpp/include/cudf/lists/sorting.hpp index 39c71f6e9fa..ee18ed57c57 100644 --- a/cpp/include/cudf/lists/sorting.hpp +++ b/cpp/include/cudf/lists/sorting.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace lists { @@ -58,7 +56,7 @@ std::unique_ptr sort_lists( order column_order, null_order null_precedence, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Segmented sort of the elements within a list in each row of a list column using stable @@ -71,7 +69,7 @@ std::unique_ptr stable_sort_lists( order column_order, null_order null_precedence, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace lists diff --git a/cpp/include/cudf/lists/stream_compaction.hpp b/cpp/include/cudf/lists/stream_compaction.hpp index 28ef13cd870..59b53c10ac9 100644 --- a/cpp/include/cudf/lists/stream_compaction.hpp +++ b/cpp/include/cudf/lists/stream_compaction.hpp @@ -18,10 +18,9 @@ #include #include #include +#include #include -#include -#include namespace CUDF_EXPORT cudf { namespace lists { @@ -65,7 +64,7 @@ std::unique_ptr apply_boolean_mask( lists_column_view const& input, lists_column_view const& boolean_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a new list column without duplicate elements in each list. @@ -92,7 +91,7 @@ std::unique_ptr distinct( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group diff --git a/cpp/include/cudf/merge.hpp b/cpp/include/cudf/merge.hpp index 83c6ff04500..18701bf8ec6 100644 --- a/cpp/include/cudf/merge.hpp +++ b/cpp/include/cudf/merge.hpp @@ -18,9 +18,7 @@ #include #include - -#include -#include +#include #include #include @@ -109,6 +107,6 @@ std::unique_ptr merge( std::vector const& column_order, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/null_mask.hpp b/cpp/include/cudf/null_mask.hpp index 70ca6aa29c5..fe719bf2c62 100644 --- a/cpp/include/cudf/null_mask.hpp +++ b/cpp/include/cudf/null_mask.hpp @@ -18,11 +18,10 @@ #include #include #include +#include #include #include -#include -#include #include @@ -92,7 +91,7 @@ rmm::device_buffer create_null_mask( size_type size, mask_state state, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Sets a pre-allocated bitmask buffer to a given state in the range @@ -135,7 +134,7 @@ rmm::device_buffer copy_bitmask( size_type begin_bit, size_type end_bit, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Copies `view`'s bitmask from the bits @@ -152,7 +151,7 @@ rmm::device_buffer copy_bitmask( rmm::device_buffer copy_bitmask( column_view const& view, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs bitwise AND of the bitmasks of columns of a table. Returns @@ -169,7 +168,7 @@ rmm::device_buffer copy_bitmask( std::pair bitmask_and( table_view const& view, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs bitwise OR of the bitmasks of columns of a table. Returns @@ -186,7 +185,7 @@ std::pair bitmask_and( std::pair bitmask_or( table_view const& view, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Given a validity bitmask, counts the number of null elements (unset bits) diff --git a/cpp/include/cudf/partitioning.hpp b/cpp/include/cudf/partitioning.hpp index 6a53553063e..385da993262 100644 --- a/cpp/include/cudf/partitioning.hpp +++ b/cpp/include/cudf/partitioning.hpp @@ -19,10 +19,9 @@ #include #include #include +#include #include -#include -#include #include #include @@ -80,7 +79,7 @@ std::pair, std::vector> partition( table_view const& t, column_view const& partition_map, size_type num_partitions, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Partitions rows from the input table into multiple output tables. @@ -109,7 +108,7 @@ std::pair, std::vector> hash_partition( hash_id hash_function = hash_id::HASH_MURMUR3, uint32_t seed = DEFAULT_HASH_SEED, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Round-robin partition. @@ -252,7 +251,7 @@ std::pair, std::vector> round_robi table_view const& input, cudf::size_type num_partitions, cudf::size_type start_partition = 0, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/quantiles.hpp b/cpp/include/cudf/quantiles.hpp index 47eac2e72f9..f6bae170f03 100644 --- a/cpp/include/cudf/quantiles.hpp +++ b/cpp/include/cudf/quantiles.hpp @@ -21,9 +21,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { /** @@ -61,7 +59,7 @@ std::unique_ptr quantile( interpolation interp = interpolation::LINEAR, column_view const& ordered_indices = {}, bool exact = true, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the rows of the input corresponding to the requested quantiles. @@ -100,7 +98,7 @@ std::unique_ptr
quantiles( cudf::sorted is_input_sorted = sorted::NO, std::vector const& column_order = {}, std::vector const& null_precedence = {}, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Calculate approximate percentiles on an input tdigest column. @@ -127,7 +125,7 @@ std::unique_ptr
quantiles( std::unique_ptr percentile_approx( tdigest::tdigest_column_view const& input, column_view const& percentiles, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/reduction.hpp b/cpp/include/cudf/reduction.hpp index e42ff5df15d..41be2e70cc3 100644 --- a/cpp/include/cudf/reduction.hpp +++ b/cpp/include/cudf/reduction.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -85,7 +83,7 @@ std::unique_ptr reduce( reduce_aggregation const& agg, data_type output_dtype, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the reduction of the values in all rows of a column with an initial value @@ -109,7 +107,7 @@ std::unique_ptr reduce( data_type output_dtype, std::optional> init, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Compute reduction of each segment in the input column @@ -161,7 +159,7 @@ std::unique_ptr segmented_reduce( data_type output_dtype, null_policy null_handling, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Compute reduction of each segment in the input column with an initial value. Only SUM, @@ -188,7 +186,7 @@ std::unique_ptr segmented_reduce( null_policy null_handling, std::optional> init, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the scan of a column. @@ -214,7 +212,7 @@ std::unique_ptr scan( scan_type inclusive, null_policy null_handling = null_policy::EXCLUDE, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Determines the minimum and maximum values of a column. @@ -229,7 +227,7 @@ std::unique_ptr scan( std::pair, std::unique_ptr> minmax( column_view const& col, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group diff --git a/cpp/include/cudf/reduction/detail/histogram.hpp b/cpp/include/cudf/reduction/detail/histogram.hpp index 5b17df47ec7..c990db32977 100644 --- a/cpp/include/cudf/reduction/detail/histogram.hpp +++ b/cpp/include/cudf/reduction/detail/histogram.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/include/cudf/reduction/detail/reduction.cuh b/cpp/include/cudf/reduction/detail/reduction.cuh index 7d1754d86f2..37e1545bcf2 100644 --- a/cpp/include/cudf/reduction/detail/reduction.cuh +++ b/cpp/include/cudf/reduction/detail/reduction.cuh @@ -20,13 +20,13 @@ #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/reduction/detail/reduction.hpp b/cpp/include/cudf/reduction/detail/reduction.hpp index a15783fb460..fd0e3abb529 100644 --- a/cpp/include/cudf/reduction/detail/reduction.hpp +++ b/cpp/include/cudf/reduction/detail/reduction.hpp @@ -20,8 +20,7 @@ #include #include #include - -#include +#include #include diff --git a/cpp/include/cudf/reduction/detail/reduction_functions.hpp b/cpp/include/cudf/reduction/detail/reduction_functions.hpp index fa21dc87e64..b40211a54ad 100644 --- a/cpp/include/cudf/reduction/detail/reduction_functions.hpp +++ b/cpp/include/cudf/reduction/detail/reduction_functions.hpp @@ -21,9 +21,9 @@ #include #include #include +#include #include -#include #include diff --git a/cpp/include/cudf/reduction/detail/segmented_reduction_functions.hpp b/cpp/include/cudf/reduction/detail/segmented_reduction_functions.hpp index 1c55b387454..af45a14874b 100644 --- a/cpp/include/cudf/reduction/detail/segmented_reduction_functions.hpp +++ b/cpp/include/cudf/reduction/detail/segmented_reduction_functions.hpp @@ -19,11 +19,10 @@ #include #include #include -#include #include +#include #include -#include #include diff --git a/cpp/include/cudf/replace.hpp b/cpp/include/cudf/replace.hpp index 43aabd6c6c6..8d8510da5ea 100644 --- a/cpp/include/cudf/replace.hpp +++ b/cpp/include/cudf/replace.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -58,7 +56,7 @@ std::unique_ptr replace_nulls( column_view const& input, column_view const& replacement, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Replaces all null values in a column with a scalar. @@ -77,7 +75,7 @@ std::unique_ptr replace_nulls( column_view const& input, scalar const& replacement, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Replaces all null values in a column with the first non-null value that precedes/follows. @@ -96,7 +94,7 @@ std::unique_ptr replace_nulls( column_view const& input, replace_policy const& replace_policy, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Replaces all NaN values in a column with corresponding values from another column @@ -124,7 +122,7 @@ std::unique_ptr replace_nans( column_view const& input, column_view const& replacement, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Replaces all NaN values in a column with a scalar @@ -151,7 +149,7 @@ std::unique_ptr replace_nans( column_view const& input, scalar const& replacement, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Return a copy of `input_col` replacing any `values_to_replace[i]` @@ -170,7 +168,7 @@ std::unique_ptr find_and_replace_all( column_view const& values_to_replace, column_view const& replacement_values, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Replaces values less than `lo` in `input` with `lo_replace`, @@ -225,7 +223,7 @@ std::unique_ptr clamp( scalar const& hi, scalar const& hi_replace, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Replaces values less than `lo` in `input` with `lo`, @@ -271,7 +269,7 @@ std::unique_ptr clamp( scalar const& lo, scalar const& hi, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Copies from a column of floating-point elements and replaces `-NaN` and `-0.0` with `+NaN` @@ -291,7 +289,7 @@ std::unique_ptr clamp( std::unique_ptr normalize_nans_and_zeros( column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Modifies a column of floating-point elements to replace all `-NaN` and `-0.0` with `+NaN` diff --git a/cpp/include/cudf/reshape.hpp b/cpp/include/cudf/reshape.hpp index 07aaf6488ad..e437e7abfca 100644 --- a/cpp/include/cudf/reshape.hpp +++ b/cpp/include/cudf/reshape.hpp @@ -20,9 +20,7 @@ #include #include #include - -#include -#include +#include #include @@ -55,7 +53,7 @@ namespace CUDF_EXPORT cudf { std::unique_ptr interleave_columns( table_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Repeats the rows from `input` table `count` times to form a new table. @@ -80,7 +78,7 @@ std::unique_ptr
tile( table_view const& input, size_type count, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Configures whether byte casting flips endianness @@ -107,7 +105,7 @@ std::unique_ptr byte_cast( column_view const& input_column, flip_endianness endian_configuration, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group diff --git a/cpp/include/cudf/rolling.hpp b/cpp/include/cudf/rolling.hpp index 5a8c454d8fc..8a717c3f510 100644 --- a/cpp/include/cudf/rolling.hpp +++ b/cpp/include/cudf/rolling.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -70,7 +68,7 @@ std::unique_ptr rolling_window( size_type min_periods, rolling_aggregation const& agg, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief @copybrief rolling_window @@ -95,7 +93,7 @@ std::unique_ptr rolling_window( size_type min_periods, rolling_aggregation const& agg, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Abstraction for window boundary sizes @@ -245,7 +243,7 @@ std::unique_ptr grouped_rolling_window( size_type min_periods, rolling_aggregation const& aggr, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief @copybrief grouped_rolling_window @@ -267,7 +265,7 @@ std::unique_ptr grouped_rolling_window( size_type min_periods, rolling_aggregation const& aggr, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief @copybrief grouped_rolling_window @@ -294,7 +292,7 @@ std::unique_ptr grouped_rolling_window( size_type min_periods, rolling_aggregation const& aggr, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief @copybrief grouped_rolling_window @@ -318,7 +316,7 @@ std::unique_ptr grouped_rolling_window( size_type min_periods, rolling_aggregation const& aggr, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Applies a grouping-aware, timestamp-based rolling window function to the values in a @@ -415,7 +413,7 @@ std::unique_ptr grouped_time_range_rolling_window( size_type min_periods, rolling_aggregation const& aggr, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Applies a grouping-aware, timestamp-based rolling window function to the values in a @@ -446,7 +444,7 @@ std::unique_ptr grouped_time_range_rolling_window( size_type min_periods, rolling_aggregation const& aggr, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Applies a grouping-aware, value range-based rolling window function to the values in a @@ -568,7 +566,7 @@ std::unique_ptr grouped_range_rolling_window( size_type min_periods, rolling_aggregation const& aggr, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Applies a variable-size rolling window function to the values in a column. @@ -613,7 +611,7 @@ std::unique_ptr rolling_window( size_type min_periods, rolling_aggregation const& agg, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/round.hpp b/cpp/include/cudf/round.hpp index ef144b328f7..ba56ff34b97 100644 --- a/cpp/include/cudf/round.hpp +++ b/cpp/include/cudf/round.hpp @@ -18,9 +18,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { @@ -76,7 +74,7 @@ std::unique_ptr round( column_view const& input, int32_t decimal_places = 0, rounding_method method = rounding_method::HALF_UP, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/scalar/scalar.hpp b/cpp/include/cudf/scalar/scalar.hpp index 2c5cc60fc70..e8a498afc09 100644 --- a/cpp/include/cudf/scalar/scalar.hpp +++ b/cpp/include/cudf/scalar/scalar.hpp @@ -19,13 +19,12 @@ #include #include #include +#include #include #include #include #include -#include -#include /** * @file @@ -114,7 +113,7 @@ class scalar { */ scalar(scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new scalar object. @@ -130,7 +129,7 @@ class scalar { scalar(data_type type, bool is_valid = false, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); }; namespace detail { @@ -166,7 +165,7 @@ class fixed_width_scalar : public scalar { */ fixed_width_scalar(fixed_width_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Set the value of the scalar. @@ -217,7 +216,7 @@ class fixed_width_scalar : public scalar { fixed_width_scalar(T value, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new fixed width scalar object from existing device memory. @@ -230,7 +229,7 @@ class fixed_width_scalar : public scalar { fixed_width_scalar(rmm::device_scalar&& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); }; } // namespace detail @@ -266,7 +265,7 @@ class numeric_scalar : public detail::fixed_width_scalar { */ numeric_scalar(numeric_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new numeric scalar object. @@ -279,7 +278,7 @@ class numeric_scalar : public detail::fixed_width_scalar { numeric_scalar(T value, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new numeric scalar object from existing device memory. @@ -292,7 +291,7 @@ class numeric_scalar : public detail::fixed_width_scalar { numeric_scalar(rmm::device_scalar&& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); }; /** @@ -329,7 +328,7 @@ class fixed_point_scalar : public scalar { */ fixed_point_scalar(fixed_point_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new fixed_point scalar object from already shifted value and scale. @@ -344,7 +343,7 @@ class fixed_point_scalar : public scalar { numeric::scale_type scale, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new fixed_point scalar object from a value and default 0-scale. @@ -357,7 +356,7 @@ class fixed_point_scalar : public scalar { fixed_point_scalar(rep_type value, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new fixed_point scalar object from a fixed_point number. @@ -370,7 +369,7 @@ class fixed_point_scalar : public scalar { fixed_point_scalar(T value, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new fixed_point scalar object from existing device memory. @@ -385,7 +384,7 @@ class fixed_point_scalar : public scalar { numeric::scale_type scale, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Get the value of the scalar. @@ -454,7 +453,7 @@ class string_scalar : public scalar { */ string_scalar(string_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new string scalar object. @@ -469,7 +468,7 @@ class string_scalar : public scalar { string_scalar(std::string const& string, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new string scalar object from string_view. @@ -484,7 +483,7 @@ class string_scalar : public scalar { string_scalar(value_type const& source, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new string scalar object from string_view in device memory. @@ -499,7 +498,7 @@ class string_scalar : public scalar { string_scalar(rmm::device_scalar& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new string scalar object by moving an existing string data buffer. @@ -515,7 +514,7 @@ class string_scalar : public scalar { string_scalar(rmm::device_buffer&& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Explicit conversion operator to get the value of the scalar in a host std::string. @@ -587,7 +586,7 @@ class chrono_scalar : public detail::fixed_width_scalar { */ chrono_scalar(chrono_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new chrono scalar object. @@ -600,7 +599,7 @@ class chrono_scalar : public detail::fixed_width_scalar { chrono_scalar(T value, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new chrono scalar object from existing device memory. @@ -613,7 +612,7 @@ class chrono_scalar : public detail::fixed_width_scalar { chrono_scalar(rmm::device_scalar&& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); }; /** @@ -646,7 +645,7 @@ class timestamp_scalar : public chrono_scalar { */ timestamp_scalar(timestamp_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new timestamp scalar object from a duration that is @@ -662,7 +661,7 @@ class timestamp_scalar : public chrono_scalar { timestamp_scalar(Duration2 const& value, bool is_valid, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the duration in number of ticks since the UNIX epoch. @@ -702,7 +701,7 @@ class duration_scalar : public chrono_scalar { */ duration_scalar(duration_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new duration scalar object from tick counts. @@ -715,7 +714,7 @@ class duration_scalar : public chrono_scalar { duration_scalar(rep_type value, bool is_valid, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the duration in number of ticks. @@ -751,7 +750,7 @@ class list_scalar : public scalar { */ list_scalar(list_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new list scalar object from column_view. @@ -766,7 +765,7 @@ class list_scalar : public scalar { list_scalar(cudf::column_view const& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new list scalar object from existing column. @@ -779,7 +778,7 @@ class list_scalar : public scalar { list_scalar(cudf::column&& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a non-owning, immutable view to underlying device data. @@ -816,7 +815,7 @@ class struct_scalar : public scalar { */ struct_scalar(struct_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new struct scalar object from table_view. @@ -831,7 +830,7 @@ class struct_scalar : public scalar { struct_scalar(table_view const& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new struct scalar object from a host_span of column_views. @@ -846,7 +845,7 @@ class struct_scalar : public scalar { struct_scalar(host_span data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new struct scalar object from an existing table in device memory. @@ -862,7 +861,7 @@ class struct_scalar : public scalar { struct_scalar(table&& data, bool is_valid = true, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a non-owning, immutable view to underlying device data. diff --git a/cpp/include/cudf/scalar/scalar_factories.hpp b/cpp/include/cudf/scalar/scalar_factories.hpp index a422c3bfbe9..87700115996 100644 --- a/cpp/include/cudf/scalar/scalar_factories.hpp +++ b/cpp/include/cudf/scalar/scalar_factories.hpp @@ -17,10 +17,9 @@ #include #include +#include #include -#include -#include namespace CUDF_EXPORT cudf { /** @@ -45,7 +44,7 @@ namespace CUDF_EXPORT cudf { std::unique_ptr make_numeric_scalar( data_type type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct scalar with uninitialized storage to hold a value of the @@ -62,7 +61,7 @@ std::unique_ptr make_numeric_scalar( std::unique_ptr make_timestamp_scalar( data_type type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct scalar with uninitialized storage to hold a value of the @@ -79,7 +78,7 @@ std::unique_ptr make_timestamp_scalar( std::unique_ptr make_duration_scalar( data_type type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct scalar with uninitialized storage to hold a value of the @@ -96,7 +95,7 @@ std::unique_ptr make_duration_scalar( std::unique_ptr make_fixed_width_scalar( data_type type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct STRING type scalar given a `std::string`. @@ -113,7 +112,7 @@ std::unique_ptr make_fixed_width_scalar( std::unique_ptr make_string_scalar( std::string const& string, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Constructs default constructed scalar of type `type` @@ -128,7 +127,7 @@ std::unique_ptr make_string_scalar( std::unique_ptr make_default_constructed_scalar( data_type type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates an empty (invalid) scalar of the same type as the `input` column_view. @@ -143,7 +142,7 @@ std::unique_ptr make_default_constructed_scalar( std::unique_ptr make_empty_scalar_like( column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct scalar using the given value of fixed width type @@ -158,7 +157,7 @@ template std::unique_ptr make_fixed_width_scalar( T value, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { return std::make_unique>(value, true, stream, mr); } @@ -178,7 +177,7 @@ std::unique_ptr make_fixed_point_scalar( typename T::rep value, numeric::scale_type scale, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { return std::make_unique>(value, scale, true, stream, mr); } @@ -194,7 +193,7 @@ std::unique_ptr make_fixed_point_scalar( std::unique_ptr make_list_scalar( column_view elements, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a struct scalar using the given table_view. @@ -209,7 +208,7 @@ std::unique_ptr make_list_scalar( std::unique_ptr make_struct_scalar( table_view const& data, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a struct scalar using the given span of column views. @@ -224,7 +223,7 @@ std::unique_ptr make_struct_scalar( std::unique_ptr make_struct_scalar( host_span data, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/search.hpp b/cpp/include/cudf/search.hpp index ad170ec726b..e10c8c8b4d2 100644 --- a/cpp/include/cudf/search.hpp +++ b/cpp/include/cudf/search.hpp @@ -21,9 +21,7 @@ #include #include #include - -#include -#include +#include #include @@ -75,7 +73,7 @@ std::unique_ptr lower_bound( std::vector const& column_order, std::vector const& null_precedence, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Find largest indices in a sorted table where values should be inserted to maintain order. @@ -117,7 +115,7 @@ std::unique_ptr upper_bound( std::vector const& column_order, std::vector const& null_precedence, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Check if the given `needle` value exists in the `haystack` column. @@ -166,7 +164,7 @@ std::unique_ptr contains( column_view const& haystack, column_view const& needles, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/sorting.hpp b/cpp/include/cudf/sorting.hpp index 4cb265a2a0b..b773f76defe 100644 --- a/cpp/include/cudf/sorting.hpp +++ b/cpp/include/cudf/sorting.hpp @@ -20,9 +20,7 @@ #include #include #include - -#include -#include +#include #include #include @@ -56,7 +54,7 @@ std::unique_ptr sorted_order( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the row indices that would produce `input` in a stable @@ -71,7 +69,7 @@ std::unique_ptr stable_sorted_order( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Checks whether the rows of a `table` are sorted in a lexicographical @@ -115,7 +113,7 @@ std::unique_ptr
sort( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a stable lexicographic sort of the rows of a table @@ -127,7 +125,7 @@ std::unique_ptr
stable_sort( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a key-value sort. @@ -157,7 +155,7 @@ std::unique_ptr
sort_by_key( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a key-value stable sort. @@ -170,7 +168,7 @@ std::unique_ptr
stable_sort_by_key( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Computes the ranks of input column in sorted order. @@ -210,7 +208,7 @@ std::unique_ptr rank( null_order null_precedence, bool percentage, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns sorted order after sorting each segment in the table. @@ -261,7 +259,7 @@ std::unique_ptr segmented_sorted_order( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns sorted order after stably sorting each segment in the table. @@ -274,7 +272,7 @@ std::unique_ptr stable_segmented_sorted_order( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a lexicographic segmented sort of a table @@ -330,7 +328,7 @@ std::unique_ptr
segmented_sort_by_key( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Performs a stably lexicographic segmented sort of a table @@ -344,7 +342,7 @@ std::unique_ptr
stable_segmented_sort_by_key( std::vector const& column_order = {}, std::vector const& null_precedence = {}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/stream_compaction.hpp b/cpp/include/cudf/stream_compaction.hpp index ced8d5849d0..ed0730d50a4 100644 --- a/cpp/include/cudf/stream_compaction.hpp +++ b/cpp/include/cudf/stream_compaction.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include #include @@ -77,7 +75,7 @@ std::unique_ptr
drop_nulls( std::vector const& keys, cudf::size_type keep_threshold, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Filters a table to remove null elements. @@ -110,7 +108,7 @@ std::unique_ptr
drop_nulls( table_view const& input, std::vector const& keys, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Filters a table to remove NANs with threshold count. @@ -155,7 +153,7 @@ std::unique_ptr
drop_nans( std::vector const& keys, cudf::size_type keep_threshold, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Filters a table to remove NANs. @@ -189,7 +187,7 @@ std::unique_ptr
drop_nans( table_view const& input, std::vector const& keys, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Filters `input` using `boolean_mask` of boolean values as a mask. @@ -217,7 +215,7 @@ std::unique_ptr
apply_boolean_mask( table_view const& input, column_view const& boolean_mask, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Choices for drop_duplicates API for retainment of duplicate rows @@ -263,7 +261,7 @@ std::unique_ptr
unique( duplicate_keep_option keep, null_equality nulls_equal = null_equality::EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a new table without duplicate rows. @@ -292,7 +290,7 @@ std::unique_ptr
distinct( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a column of indices of all distinct rows in the input table. @@ -314,7 +312,7 @@ std::unique_ptr distinct_indices( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Create a new table without duplicate rows, preserving input order. @@ -346,7 +344,7 @@ std::unique_ptr
stable_distinct( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Count the number of consecutive groups of equivalent rows in a column. diff --git a/cpp/include/cudf/strings/attributes.hpp b/cpp/include/cudf/strings/attributes.hpp index 323290e907c..5f2eda8fa5b 100644 --- a/cpp/include/cudf/strings/attributes.hpp +++ b/cpp/include/cudf/strings/attributes.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { @@ -48,7 +46,7 @@ namespace strings { */ std::unique_ptr count_characters( strings_column_view const& input, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column containing byte lengths @@ -66,7 +64,7 @@ std::unique_ptr count_characters( */ std::unique_ptr count_bytes( strings_column_view const& input, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a numeric column with code point values (integers) for each @@ -86,7 +84,7 @@ std::unique_ptr count_bytes( */ std::unique_ptr code_points( strings_column_view const& input, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of strings_apis group diff --git a/cpp/include/cudf/strings/capitalize.hpp b/cpp/include/cudf/strings/capitalize.hpp index 420b46a05b2..312e3a5bef1 100644 --- a/cpp/include/cudf/strings/capitalize.hpp +++ b/cpp/include/cudf/strings/capitalize.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -63,7 +61,7 @@ std::unique_ptr capitalize( strings_column_view const& input, string_scalar const& delimiters = string_scalar("", true, cudf::get_default_stream()), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Modifies first character of each word to upper-case and lower-cases the rest. @@ -96,7 +94,7 @@ std::unique_ptr title( strings_column_view const& input, string_character_types sequence_type = string_character_types::ALPHA, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Checks if the strings in the input column are title formatted. @@ -125,7 +123,7 @@ std::unique_ptr title( std::unique_ptr is_title( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/case.hpp b/cpp/include/cudf/strings/case.hpp index 45f56a681a6..c2bd559accc 100644 --- a/cpp/include/cudf/strings/case.hpp +++ b/cpp/include/cudf/strings/case.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -46,7 +44,7 @@ namespace strings { std::unique_ptr to_lower( strings_column_view const& strings, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Converts a column of strings to upper case. @@ -65,7 +63,7 @@ std::unique_ptr to_lower( std::unique_ptr to_upper( strings_column_view const& strings, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of strings converting lower case characters to @@ -85,7 +83,7 @@ std::unique_ptr to_upper( std::unique_ptr swapcase( strings_column_view const& strings, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/char_types/char_types.hpp b/cpp/include/cudf/strings/char_types/char_types.hpp index a6af681eec6..3ebe5cb53e9 100644 --- a/cpp/include/cudf/strings/char_types/char_types.hpp +++ b/cpp/include/cudf/strings/char_types/char_types.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -68,7 +66,7 @@ std::unique_ptr all_characters_of_type( string_character_types types, string_character_types verify_types = string_character_types::ALL_TYPES, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Filter specific character types from a column of strings. @@ -115,7 +113,7 @@ std::unique_ptr filter_characters_of_type( string_scalar const& replacement = string_scalar(""), string_character_types types_to_keep = string_character_types::ALL_TYPES, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/combine.hpp b/cpp/include/cudf/strings/combine.hpp index 2cade813d78..d766fba0cdc 100644 --- a/cpp/include/cudf/strings/combine.hpp +++ b/cpp/include/cudf/strings/combine.hpp @@ -20,9 +20,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -81,7 +79,7 @@ std::unique_ptr join_strings( string_scalar const& separator = string_scalar(""), string_scalar const& narep = string_scalar("", false), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Concatenates a list of strings columns using separators for each row @@ -149,7 +147,7 @@ std::unique_ptr concatenate( string_scalar const& col_narep = string_scalar("", false), separator_on_nulls separate_nulls = separator_on_nulls::YES, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Row-wise concatenates the given list of strings columns and @@ -204,7 +202,7 @@ std::unique_ptr concatenate( string_scalar const& narep = string_scalar("", false), separator_on_nulls separate_nulls = separator_on_nulls::YES, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Given a lists column of strings (each row is a list of strings), concatenates the strings @@ -271,7 +269,7 @@ std::unique_ptr join_list_elements( separator_on_nulls separate_nulls = separator_on_nulls::YES, output_if_empty_list empty_list_policy = output_if_empty_list::EMPTY_STRING, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Given a lists column of strings (each row is a list of strings), concatenates the strings @@ -330,7 +328,7 @@ std::unique_ptr join_list_elements( separator_on_nulls separate_nulls = separator_on_nulls::YES, output_if_empty_list empty_list_policy = output_if_empty_list::EMPTY_STRING, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/contains.hpp b/cpp/include/cudf/strings/contains.hpp index 59c9b2dea40..2a25ac79bbb 100644 --- a/cpp/include/cudf/strings/contains.hpp +++ b/cpp/include/cudf/strings/contains.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -61,7 +59,7 @@ std::unique_ptr contains_re( strings_column_view const& input, regex_program const& prog, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying rows which @@ -89,7 +87,7 @@ std::unique_ptr matches_re( strings_column_view const& input, regex_program const& prog, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the number of times the given regex_program's pattern @@ -117,7 +115,7 @@ std::unique_ptr count_re( strings_column_view const& input, regex_program const& prog, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying rows which @@ -164,7 +162,7 @@ std::unique_ptr like( string_scalar const& pattern, string_scalar const& escape_character = string_scalar(""), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying rows which @@ -205,7 +203,7 @@ std::unique_ptr like( strings_column_view const& patterns, string_scalar const& escape_character = string_scalar(""), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_booleans.hpp b/cpp/include/cudf/strings/convert/convert_booleans.hpp index d79dd4a80ea..bf7b6c1525b 100644 --- a/cpp/include/cudf/strings/convert/convert_booleans.hpp +++ b/cpp/include/cudf/strings/convert/convert_booleans.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -46,7 +44,7 @@ std::unique_ptr to_booleans( strings_column_view const& input, string_scalar const& true_string, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new strings column converting the boolean values from the @@ -68,7 +66,7 @@ std::unique_ptr from_booleans( string_scalar const& true_string, string_scalar const& false_string, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_datetime.hpp b/cpp/include/cudf/strings/convert/convert_datetime.hpp index c3b3c91ab35..04eba83925d 100644 --- a/cpp/include/cudf/strings/convert/convert_datetime.hpp +++ b/cpp/include/cudf/strings/convert/convert_datetime.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include #include #include @@ -90,7 +88,7 @@ std::unique_ptr to_timestamps( data_type timestamp_type, std::string_view format, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Verifies the given strings column can be parsed to timestamps using the provided format @@ -137,7 +135,7 @@ std::unique_ptr is_timestamp( strings_column_view const& input, std::string_view format, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new strings column converting a timestamp column into @@ -251,7 +249,7 @@ std::unique_ptr from_timestamps( strings_column_view const& names = strings_column_view(column_view{ data_type{type_id::STRING}, 0, nullptr, nullptr, 0}), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_durations.hpp b/cpp/include/cudf/strings/convert/convert_durations.hpp index 8b69968a609..25184cbfd02 100644 --- a/cpp/include/cudf/strings/convert/convert_durations.hpp +++ b/cpp/include/cudf/strings/convert/convert_durations.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -78,7 +76,7 @@ std::unique_ptr to_durations( data_type duration_type, std::string_view format, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new strings column converting a duration column into @@ -129,7 +127,7 @@ std::unique_ptr from_durations( column_view const& durations, std::string_view format = "%D days %H:%M:%S", rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_fixed_point.hpp b/cpp/include/cudf/strings/convert/convert_fixed_point.hpp index a9c5aea6343..6d5e94a8e02 100644 --- a/cpp/include/cudf/strings/convert/convert_fixed_point.hpp +++ b/cpp/include/cudf/strings/convert/convert_fixed_point.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -64,7 +62,7 @@ std::unique_ptr to_fixed_point( strings_column_view const& input, data_type output_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new strings column converting the fixed-point values @@ -94,7 +92,7 @@ std::unique_ptr to_fixed_point( std::unique_ptr from_fixed_point( column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying strings in which all @@ -126,7 +124,7 @@ std::unique_ptr is_fixed_point( strings_column_view const& input, data_type decimal_type = data_type{type_id::DECIMAL64}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_floats.hpp b/cpp/include/cudf/strings/convert/convert_floats.hpp index 64e9bb776f4..52fb47df94f 100644 --- a/cpp/include/cudf/strings/convert/convert_floats.hpp +++ b/cpp/include/cudf/strings/convert/convert_floats.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -50,7 +48,7 @@ std::unique_ptr to_floats( strings_column_view const& strings, data_type output_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new strings column converting the float values from the @@ -73,7 +71,7 @@ std::unique_ptr to_floats( std::unique_ptr from_floats( column_view const& floats, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying strings in which all @@ -99,7 +97,7 @@ std::unique_ptr from_floats( std::unique_ptr is_float( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_integers.hpp b/cpp/include/cudf/strings/convert/convert_integers.hpp index 62eb1fdda4d..9aad32bfba4 100644 --- a/cpp/include/cudf/strings/convert/convert_integers.hpp +++ b/cpp/include/cudf/strings/convert/convert_integers.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -57,7 +55,7 @@ std::unique_ptr to_integers( strings_column_view const& input, data_type output_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new strings column converting the integer values from the @@ -78,7 +76,7 @@ std::unique_ptr to_integers( std::unique_ptr from_integers( column_view const& integers, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying strings in which all @@ -107,7 +105,7 @@ std::unique_ptr from_integers( std::unique_ptr is_integer( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying strings in which all @@ -141,7 +139,7 @@ std::unique_ptr is_integer( strings_column_view const& input, data_type int_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new integer numeric column parsing hexadecimal values from the @@ -171,7 +169,7 @@ std::unique_ptr hex_to_integers( strings_column_view const& input, data_type output_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying strings in which all @@ -198,7 +196,7 @@ std::unique_ptr hex_to_integers( std::unique_ptr is_hex( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new strings column converting integer columns to hexadecimal @@ -231,7 +229,7 @@ std::unique_ptr is_hex( std::unique_ptr integers_to_hex( column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_ipv4.hpp b/cpp/include/cudf/strings/convert/convert_ipv4.hpp index 97d1dfee017..2dd82554cee 100644 --- a/cpp/include/cudf/strings/convert/convert_ipv4.hpp +++ b/cpp/include/cudf/strings/convert/convert_ipv4.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -54,7 +52,7 @@ namespace strings { std::unique_ptr ipv4_to_integers( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Converts integers into IPv4 addresses as strings. @@ -77,7 +75,7 @@ std::unique_ptr ipv4_to_integers( std::unique_ptr integers_to_ipv4( column_view const& integers, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a boolean column identifying strings in which all @@ -104,7 +102,7 @@ std::unique_ptr integers_to_ipv4( std::unique_ptr is_ipv4( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_lists.hpp b/cpp/include/cudf/strings/convert/convert_lists.hpp index 85b67907228..80d0511fc1f 100644 --- a/cpp/include/cudf/strings/convert/convert_lists.hpp +++ b/cpp/include/cudf/strings/convert/convert_lists.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -64,7 +62,7 @@ std::unique_ptr format_list_column( strings_column_view const& separators = strings_column_view(column_view{ data_type{type_id::STRING}, 0, nullptr, nullptr, 0}), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/convert/convert_urls.hpp b/cpp/include/cudf/strings/convert/convert_urls.hpp index a42a5cd2407..d6e87f9d543 100644 --- a/cpp/include/cudf/strings/convert/convert_urls.hpp +++ b/cpp/include/cudf/strings/convert/convert_urls.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -48,7 +46,7 @@ namespace strings { std::unique_ptr url_encode( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Encodes each string using URL encoding. @@ -71,7 +69,7 @@ std::unique_ptr url_encode( std::unique_ptr url_decode( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/detail/combine.hpp b/cpp/include/cudf/strings/detail/combine.hpp index 962191eae6a..31698457048 100644 --- a/cpp/include/cudf/strings/detail/combine.hpp +++ b/cpp/include/cudf/strings/detail/combine.hpp @@ -22,9 +22,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/concatenate.hpp b/cpp/include/cudf/strings/detail/concatenate.hpp index e038102ab1f..75762e61afe 100644 --- a/cpp/include/cudf/strings/detail/concatenate.hpp +++ b/cpp/include/cudf/strings/detail/concatenate.hpp @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/converters.hpp b/cpp/include/cudf/strings/detail/converters.hpp index 73a97499293..3880b8abc32 100644 --- a/cpp/include/cudf/strings/detail/converters.hpp +++ b/cpp/include/cudf/strings/detail/converters.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/copy_if_else.cuh b/cpp/include/cudf/strings/detail/copy_if_else.cuh index 213a41ca596..6b025e8659d 100644 --- a/cpp/include/cudf/strings/detail/copy_if_else.cuh +++ b/cpp/include/cudf/strings/detail/copy_if_else.cuh @@ -18,11 +18,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/strings/detail/copy_range.hpp b/cpp/include/cudf/strings/detail/copy_range.hpp index 71dcf9edaf3..33ac74da97f 100644 --- a/cpp/include/cudf/strings/detail/copy_range.hpp +++ b/cpp/include/cudf/strings/detail/copy_range.hpp @@ -17,9 +17,9 @@ #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/copying.hpp b/cpp/include/cudf/strings/detail/copying.hpp index b4d3362359d..f97cc9f5b5d 100644 --- a/cpp/include/cudf/strings/detail/copying.hpp +++ b/cpp/include/cudf/strings/detail/copying.hpp @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/fill.hpp b/cpp/include/cudf/strings/detail/fill.hpp index 1a3ff2c9166..55508b0ac1b 100644 --- a/cpp/include/cudf/strings/detail/fill.hpp +++ b/cpp/include/cudf/strings/detail/fill.hpp @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/gather.cuh b/cpp/include/cudf/strings/detail/gather.cuh index 4369de317b3..4216523df97 100644 --- a/cpp/include/cudf/strings/detail/gather.cuh +++ b/cpp/include/cudf/strings/detail/gather.cuh @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/strings/detail/merge.hpp b/cpp/include/cudf/strings/detail/merge.hpp index 0aa5c0c2899..92f0fe34576 100644 --- a/cpp/include/cudf/strings/detail/merge.hpp +++ b/cpp/include/cudf/strings/detail/merge.hpp @@ -21,6 +21,7 @@ #include #include +#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/replace.hpp b/cpp/include/cudf/strings/detail/replace.hpp index ab092555c48..780a0f6a9f5 100644 --- a/cpp/include/cudf/strings/detail/replace.hpp +++ b/cpp/include/cudf/strings/detail/replace.hpp @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/scan.hpp b/cpp/include/cudf/strings/detail/scan.hpp index 4991fd633d5..71fbfadf9ec 100644 --- a/cpp/include/cudf/strings/detail/scan.hpp +++ b/cpp/include/cudf/strings/detail/scan.hpp @@ -17,9 +17,9 @@ #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/scatter.cuh b/cpp/include/cudf/strings/detail/scatter.cuh index 87f0e7ae47c..e49d6dff40d 100644 --- a/cpp/include/cudf/strings/detail/scatter.cuh +++ b/cpp/include/cudf/strings/detail/scatter.cuh @@ -19,12 +19,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -70,7 +70,7 @@ std::unique_ptr scatter(SourceIterator begin, // create vector of string_view's to scatter into rmm::device_uvector target_vector = - create_string_vector_from_column(target, stream, rmm::mr::get_current_device_resource()); + create_string_vector_from_column(target, stream, cudf::get_current_device_resource_ref()); // this ensures empty strings are not mapped to nulls in the make_strings_column function auto const size = thrust::distance(begin, end); diff --git a/cpp/include/cudf/strings/detail/strings_children.cuh b/cpp/include/cudf/strings/detail/strings_children.cuh index 55b59dd4ff2..1283226879b 100644 --- a/cpp/include/cudf/strings/detail/strings_children.cuh +++ b/cpp/include/cudf/strings/detail/strings_children.cuh @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/include/cudf/strings/detail/strings_column_factories.cuh b/cpp/include/cudf/strings/detail/strings_column_factories.cuh index a3221038eed..6b1b453a752 100644 --- a/cpp/include/cudf/strings/detail/strings_column_factories.cuh +++ b/cpp/include/cudf/strings/detail/strings_column_factories.cuh @@ -22,10 +22,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/include/cudf/strings/detail/utilities.hpp b/cpp/include/cudf/strings/detail/utilities.hpp index 1fa505501d8..d276c5df7dc 100644 --- a/cpp/include/cudf/strings/detail/utilities.hpp +++ b/cpp/include/cudf/strings/detail/utilities.hpp @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/extract.hpp b/cpp/include/cudf/strings/extract.hpp index 2ef7308b802..f8bf93b77cf 100644 --- a/cpp/include/cudf/strings/extract.hpp +++ b/cpp/include/cudf/strings/extract.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -64,7 +62,7 @@ std::unique_ptr
extract( strings_column_view const& input, regex_program const& prog, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a lists column of strings where each string column row corresponds to the @@ -100,7 +98,7 @@ std::unique_ptr extract_all_record( strings_column_view const& input, regex_program const& prog, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/find.hpp b/cpp/include/cudf/strings/find.hpp index efba6da9454..e024b116a71 100644 --- a/cpp/include/cudf/strings/find.hpp +++ b/cpp/include/cudf/strings/find.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -59,7 +57,7 @@ std::unique_ptr find( size_type start = 0, size_type stop = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of character position values where the target @@ -90,7 +88,7 @@ std::unique_ptr rfind( size_type start = 0, size_type stop = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of character position values where the target @@ -117,7 +115,7 @@ std::unique_ptr find( strings_column_view const& target, size_type start = 0, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of boolean values for each string where true indicates @@ -138,7 +136,7 @@ std::unique_ptr contains( strings_column_view const& input, string_scalar const& target, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of boolean values for each string where true indicates @@ -163,7 +161,7 @@ std::unique_ptr contains( strings_column_view const& input, strings_column_view const& targets, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of boolean values for each string where true indicates @@ -185,7 +183,7 @@ std::unique_ptr starts_with( strings_column_view const& input, string_scalar const& target, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of boolean values for each string where true indicates @@ -211,7 +209,7 @@ std::unique_ptr starts_with( strings_column_view const& input, strings_column_view const& targets, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of boolean values for each string where true indicates @@ -233,7 +231,7 @@ std::unique_ptr ends_with( strings_column_view const& input, string_scalar const& target, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a column of boolean values for each string where true indicates @@ -259,7 +257,7 @@ std::unique_ptr ends_with( strings_column_view const& input, strings_column_view const& targets, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/strings/find_multiple.hpp b/cpp/include/cudf/strings/find_multiple.hpp index dea08308ff0..1fe446db8da 100644 --- a/cpp/include/cudf/strings/find_multiple.hpp +++ b/cpp/include/cudf/strings/find_multiple.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -59,7 +57,7 @@ std::unique_ptr find_multiple( strings_column_view const& input, strings_column_view const& targets, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/findall.hpp b/cpp/include/cudf/strings/findall.hpp index 26249b6842c..c6b9bc7e58a 100644 --- a/cpp/include/cudf/strings/findall.hpp +++ b/cpp/include/cudf/strings/findall.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -66,7 +64,7 @@ std::unique_ptr findall( strings_column_view const& input, regex_program const& prog, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/padding.hpp b/cpp/include/cudf/strings/padding.hpp index 11e35f717ae..606a866cb8a 100644 --- a/cpp/include/cudf/strings/padding.hpp +++ b/cpp/include/cudf/strings/padding.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -62,7 +60,7 @@ std::unique_ptr pad( side_type side = side_type::RIGHT, std::string_view fill_char = " ", rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Add '0' as padding to the left of each string. @@ -92,7 +90,7 @@ std::unique_ptr zfill( strings_column_view const& input, size_type width, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/repeat_strings.hpp b/cpp/include/cudf/strings/repeat_strings.hpp index e160f75390b..af419d9501f 100644 --- a/cpp/include/cudf/strings/repeat_strings.hpp +++ b/cpp/include/cudf/strings/repeat_strings.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -61,7 +59,7 @@ std::unique_ptr repeat_string( string_scalar const& input, size_type repeat_times, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Repeat each string in the given strings column a given number of times @@ -92,7 +90,7 @@ std::unique_ptr repeat_strings( strings_column_view const& input, size_type repeat_times, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Repeat each string in the given strings column by the numbers of times given in another @@ -129,7 +127,7 @@ std::unique_ptr repeat_strings( strings_column_view const& input, column_view const& repeat_times, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/replace.hpp b/cpp/include/cudf/strings/replace.hpp index f450b77ad7a..c7a87bbb0d0 100644 --- a/cpp/include/cudf/strings/replace.hpp +++ b/cpp/include/cudf/strings/replace.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -70,7 +68,7 @@ std::unique_ptr replace( string_scalar const& repl, cudf::size_type maxrepl = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief This function replaces each string in the column with the provided @@ -112,7 +110,7 @@ std::unique_ptr replace_slice( size_type start = 0, size_type stop = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Replaces substrings matching a list of targets with the corresponding @@ -158,7 +156,7 @@ std::unique_ptr replace_multiple( strings_column_view const& targets, strings_column_view const& repls, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/replace_re.hpp b/cpp/include/cudf/strings/replace_re.hpp index 6b487072cb2..4a58142cbe6 100644 --- a/cpp/include/cudf/strings/replace_re.hpp +++ b/cpp/include/cudf/strings/replace_re.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -60,7 +58,7 @@ std::unique_ptr replace_re( string_scalar const& replacement = string_scalar(""), std::optional max_replace_count = std::nullopt, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief For each string, replaces any character sequence matching the given patterns @@ -84,7 +82,7 @@ std::unique_ptr replace_re( strings_column_view const& replacements, regex_flags const flags = regex_flags::DEFAULT, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief For each string, replaces any character sequence matching the given regex @@ -109,7 +107,7 @@ std::unique_ptr replace_with_backrefs( regex_program const& prog, std::string_view replacement, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); } // namespace strings } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/strings/reverse.hpp b/cpp/include/cudf/strings/reverse.hpp index fbda2e5fe7c..f9ab34373df 100644 --- a/cpp/include/cudf/strings/reverse.hpp +++ b/cpp/include/cudf/strings/reverse.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -49,7 +47,7 @@ namespace strings { std::unique_ptr reverse( strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/slice.hpp b/cpp/include/cudf/strings/slice.hpp index b0da6976207..754bee4b1f0 100644 --- a/cpp/include/cudf/strings/slice.hpp +++ b/cpp/include/cudf/strings/slice.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -65,7 +63,7 @@ std::unique_ptr slice_strings( numeric_scalar const& stop = numeric_scalar(0, false), numeric_scalar const& step = numeric_scalar(1), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a new strings column that contains substrings of the @@ -110,7 +108,7 @@ std::unique_ptr slice_strings( column_view const& starts, column_view const& stops, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/split/partition.hpp b/cpp/include/cudf/strings/split/partition.hpp index 8f5ae752417..92573a665c9 100644 --- a/cpp/include/cudf/strings/split/partition.hpp +++ b/cpp/include/cudf/strings/split/partition.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -63,7 +61,7 @@ std::unique_ptr
partition( strings_column_view const& input, string_scalar const& delimiter = string_scalar(""), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a set of 3 columns by splitting each string using the @@ -97,7 +95,7 @@ std::unique_ptr
rpartition( strings_column_view const& input, string_scalar const& delimiter = string_scalar(""), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/split/split.hpp b/cpp/include/cudf/strings/split/split.hpp index ca371d7abd1..026192d4a0b 100644 --- a/cpp/include/cudf/strings/split/split.hpp +++ b/cpp/include/cudf/strings/split/split.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -58,7 +56,7 @@ std::unique_ptr
split( string_scalar const& delimiter = string_scalar(""), size_type maxsplit = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a list of columns by splitting each string using the @@ -88,7 +86,7 @@ std::unique_ptr
rsplit( string_scalar const& delimiter = string_scalar(""), size_type maxsplit = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Splits individual strings elements into a list of strings. @@ -162,7 +160,7 @@ std::unique_ptr split_record( string_scalar const& delimiter = string_scalar(""), size_type maxsplit = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Splits individual strings elements into a list of strings starting @@ -241,7 +239,7 @@ std::unique_ptr rsplit_record( string_scalar const& delimiter = string_scalar(""), size_type maxsplit = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/split/split_re.hpp b/cpp/include/cudf/strings/split/split_re.hpp index 96ef0b6e830..ce376ab93cf 100644 --- a/cpp/include/cudf/strings/split/split_re.hpp +++ b/cpp/include/cudf/strings/split/split_re.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -85,7 +83,7 @@ std::unique_ptr
split_re( regex_program const& prog, size_type maxsplit = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Splits strings elements into a table of strings columns using a @@ -141,7 +139,7 @@ std::unique_ptr
rsplit_re( regex_program const& prog, size_type maxsplit = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Splits strings elements into a list column of strings @@ -199,7 +197,7 @@ std::unique_ptr split_record_re( regex_program const& prog, size_type maxsplit = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Splits strings elements into a list column of strings using the given @@ -259,7 +257,7 @@ std::unique_ptr rsplit_record_re( regex_program const& prog, size_type maxsplit = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/strip.hpp b/cpp/include/cudf/strings/strip.hpp index 4cfba59c72c..396940dbb30 100644 --- a/cpp/include/cudf/strings/strip.hpp +++ b/cpp/include/cudf/strings/strip.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -67,7 +65,7 @@ std::unique_ptr strip( side_type side = side_type::BOTH, string_scalar const& to_strip = string_scalar(""), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/translate.hpp b/cpp/include/cudf/strings/translate.hpp index 531753f4a8c..aa69a2e5679 100644 --- a/cpp/include/cudf/strings/translate.hpp +++ b/cpp/include/cudf/strings/translate.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -58,7 +56,7 @@ std::unique_ptr translate( strings_column_view const& input, std::vector> const& chars_table, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Removes or keeps the specified character ranges in cudf::strings::filter_characters @@ -105,7 +103,7 @@ std::unique_ptr filter_characters( filter_type keep_characters = filter_type::KEEP, string_scalar const& replacement = string_scalar(""), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/utilities.hpp b/cpp/include/cudf/strings/utilities.hpp index ae445282382..999fff0f4c8 100644 --- a/cpp/include/cudf/strings/utilities.hpp +++ b/cpp/include/cudf/strings/utilities.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -35,7 +33,7 @@ namespace strings { rmm::device_uvector create_string_vector_from_column( cudf::strings_column_view const strings, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Return the threshold size for a strings column to use int64 offsets diff --git a/cpp/include/cudf/strings/wrap.hpp b/cpp/include/cudf/strings/wrap.hpp index 465a9d15d00..96ae2fb0582 100644 --- a/cpp/include/cudf/strings/wrap.hpp +++ b/cpp/include/cudf/strings/wrap.hpp @@ -17,9 +17,7 @@ #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { namespace strings { @@ -68,7 +66,7 @@ std::unique_ptr wrap( strings_column_view const& input, size_type width, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/structs/detail/concatenate.hpp b/cpp/include/cudf/structs/detail/concatenate.hpp index 16be868af52..96964eac31f 100644 --- a/cpp/include/cudf/structs/detail/concatenate.hpp +++ b/cpp/include/cudf/structs/detail/concatenate.hpp @@ -19,10 +19,9 @@ #include #include #include +#include #include -#include - namespace CUDF_EXPORT cudf { namespace structs::detail { diff --git a/cpp/include/cudf/structs/detail/scan.hpp b/cpp/include/cudf/structs/detail/scan.hpp index 6121f63d42f..e9e721c3335 100644 --- a/cpp/include/cudf/structs/detail/scan.hpp +++ b/cpp/include/cudf/structs/detail/scan.hpp @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT cudf { namespace structs::detail { diff --git a/cpp/include/cudf/table/table.hpp b/cpp/include/cudf/table/table.hpp index be2af7ac653..762131a174f 100644 --- a/cpp/include/cudf/table/table.hpp +++ b/cpp/include/cudf/table/table.hpp @@ -18,10 +18,9 @@ #include #include #include +#include #include -#include -#include #include #include @@ -58,7 +57,7 @@ class table { */ explicit table(table const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Moves the contents from a vector of `unique_ptr`s to columns to * construct a new table. @@ -77,7 +76,7 @@ class table { */ table(table_view view, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the number of columns in the table diff --git a/cpp/include/cudf/timezone.hpp b/cpp/include/cudf/timezone.hpp index 8329c64e24f..aa903770e26 100644 --- a/cpp/include/cudf/timezone.hpp +++ b/cpp/include/cudf/timezone.hpp @@ -16,9 +16,7 @@ #pragma once #include - -#include -#include +#include #include #include @@ -52,6 +50,6 @@ static constexpr uint32_t solar_cycle_entry_count = 2 * solar_cycle_years; std::unique_ptr
make_timezone_transition_table( std::optional tzif_dir, std::string_view timezone_name, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/transform.hpp b/cpp/include/cudf/transform.hpp index f16214260f7..82b8bee1acf 100644 --- a/cpp/include/cudf/transform.hpp +++ b/cpp/include/cudf/transform.hpp @@ -19,9 +19,7 @@ #include #include #include - -#include -#include +#include #include @@ -58,7 +56,7 @@ std::unique_ptr transform( data_type output_type, bool is_ptx, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a null_mask from `input` by converting `NaN` to null and @@ -75,7 +73,7 @@ std::unique_ptr transform( std::pair, size_type> nans_to_nulls( column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Compute a new column by evaluating an expression tree on a table. @@ -95,7 +93,7 @@ std::unique_ptr compute_column( table_view const& table, ast::expression const& expr, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a bitmask from a column of boolean elements. @@ -116,7 +114,7 @@ std::unique_ptr compute_column( std::pair, cudf::size_type> bools_to_mask( column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Encode the rows of the given table as integers @@ -146,7 +144,7 @@ std::pair, cudf::size_type> bools_to_mask( std::pair, std::unique_ptr> encode( cudf::table_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Encodes `input` by generating a new column for each value in `categories` indicating the @@ -180,7 +178,7 @@ std::pair, table_view> one_hot_encode( column_view const& input, column_view const& categories, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a boolean column from given bitmask. @@ -209,7 +207,7 @@ std::unique_ptr mask_to_bools( size_type begin_bit, size_type end_bit, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns an approximate cumulative size in bits of all columns in the `table_view` for @@ -240,7 +238,7 @@ std::unique_ptr mask_to_bools( std::unique_ptr row_bit_count( table_view const& t, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns an approximate cumulative size in bits of all columns in the `table_view` for @@ -265,7 +263,7 @@ std::unique_ptr segmented_row_bit_count( table_view const& t, size_type segment_length, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/transpose.hpp b/cpp/include/cudf/transpose.hpp index f4433c46a06..8b680071e71 100644 --- a/cpp/include/cudf/transpose.hpp +++ b/cpp/include/cudf/transpose.hpp @@ -18,9 +18,7 @@ #include #include #include - -#include -#include +#include namespace CUDF_EXPORT cudf { /** @@ -46,7 +44,7 @@ namespace CUDF_EXPORT cudf { */ std::pair, table_view> transpose( table_view const& input, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/unary.hpp b/cpp/include/cudf/unary.hpp index 55f4c1f5a23..53e0f3a15d2 100644 --- a/cpp/include/cudf/unary.hpp +++ b/cpp/include/cudf/unary.hpp @@ -21,11 +21,9 @@ #include #include #include +#include #include -#include -#include - #include namespace CUDF_EXPORT cudf { @@ -159,7 +157,7 @@ std::unique_ptr unary_operation( cudf::column_view const& input, cudf::unary_operator op, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a column of `type_id::BOOL8` elements where for every element in `input` `true` @@ -175,7 +173,7 @@ std::unique_ptr unary_operation( std::unique_ptr is_null( cudf::column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a column of `type_id::BOOL8` elements where for every element in `input` `true` @@ -191,7 +189,7 @@ std::unique_ptr is_null( std::unique_ptr is_valid( cudf::column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Casts data from dtype specified in input to dtype specified in output. @@ -210,7 +208,7 @@ std::unique_ptr cast( column_view const& input, data_type out_type, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Check if a cast between two datatypes is supported. @@ -238,7 +236,7 @@ bool is_supported_cast(data_type from, data_type to) noexcept; std::unique_ptr is_nan( cudf::column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a column of `type_id::BOOL8` elements indicating the absence of `NaN` values @@ -257,7 +255,7 @@ std::unique_ptr is_nan( std::unique_ptr is_not_nan( cudf::column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/utilities/memory_resource.hpp b/cpp/include/cudf/utilities/memory_resource.hpp new file mode 100644 index 00000000000..b562574fd79 --- /dev/null +++ b/cpp/include/cudf/utilities/memory_resource.hpp @@ -0,0 +1,90 @@ +/* + * 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. + */ + +#pragma once + +#include + +#include +#include +#include +#include + +namespace cudf { + +/** + * @addtogroup memory_resource + * @{ + * @file + */ + +/** + * @brief Get the current device memory resource. + * + * @return The current device memory resource. + */ +inline rmm::mr::device_memory_resource* get_current_device_resource() +{ + return rmm::mr::get_current_device_resource(); +} + +/** + * @brief Get the current device memory resource reference. + * + * @return The current device memory resource reference. + */ +inline rmm::device_async_resource_ref get_current_device_resource_ref() +{ + // For now, match current behavior which is to return current resource pointer + return rmm::mr::get_current_device_resource(); +} + +/** + * @brief Set the current device memory resource. + * + * @param mr The new device memory resource. + * @return The previous device memory resource. + */ +inline rmm::mr::device_memory_resource* set_current_device_resource( + rmm::mr::device_memory_resource* mr) +{ + return rmm::mr::set_current_device_resource(mr); +} + +/** + * @brief Set the current device memory resource reference. + * + * @param mr The new device memory resource reference. + * @return The previous device memory resource reference. + */ +inline rmm::device_async_resource_ref set_current_device_resource_ref( + rmm::device_async_resource_ref mr) +{ + return rmm::mr::set_current_device_resource_ref(mr); +} + +/** + * @brief Reset the current device memory resource reference to the initial resource. + * + * @return The previous device memory resource reference. + */ +inline rmm::device_async_resource_ref reset_current_device_resource_ref() +{ + return rmm::mr::reset_current_device_resource_ref(); +} + +/** @} */ // end of group +} // namespace cudf diff --git a/cpp/include/cudf/utilities/pinned_memory.hpp b/cpp/include/cudf/utilities/pinned_memory.hpp index 623a033698f..2cab0aa363e 100644 --- a/cpp/include/cudf/utilities/pinned_memory.hpp +++ b/cpp/include/cudf/utilities/pinned_memory.hpp @@ -17,8 +17,7 @@ #pragma once #include - -#include +#include #include diff --git a/cpp/include/cudf_test/base_fixture.hpp b/cpp/include/cudf_test/base_fixture.hpp index 04bd51e9aa3..7b86f971cae 100644 --- a/cpp/include/cudf_test/base_fixture.hpp +++ b/cpp/include/cudf_test/base_fixture.hpp @@ -20,11 +20,10 @@ #include #include +#include #include #include -#include -#include namespace CUDF_EXPORT cudf { namespace test { @@ -38,7 +37,7 @@ namespace test { * ``` */ class BaseFixture : public ::testing::Test { - rmm::device_async_resource_ref _mr{rmm::mr::get_current_device_resource()}; + rmm::device_async_resource_ref _mr{cudf::get_current_device_resource_ref()}; public: /** @@ -59,7 +58,7 @@ class BaseFixture : public ::testing::Test { */ template class BaseFixtureWithParam : public ::testing::TestWithParam { - rmm::device_async_resource_ref _mr{rmm::mr::get_current_device_resource()}; + rmm::device_async_resource_ref _mr{cudf::get_current_device_resource_ref()}; public: /** diff --git a/cpp/include/cudf_test/column_wrapper.hpp b/cpp/include/cudf_test/column_wrapper.hpp index d00db222b62..6206c1311d2 100644 --- a/cpp/include/cudf_test/column_wrapper.hpp +++ b/cpp/include/cudf_test/column_wrapper.hpp @@ -33,11 +33,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -771,10 +771,10 @@ class strings_column_wrapper : public detail::column_wrapper { auto all_valid = thrust::make_constant_iterator(true); auto [chars, offsets] = detail::make_chars_and_offsets(begin, end, all_valid); auto d_chars = cudf::detail::make_device_uvector_async( - chars, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()); + chars, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_offsets = std::make_unique( cudf::detail::make_device_uvector_sync( - offsets, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()), + offsets, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()), rmm::device_buffer{}, 0); wrapped = @@ -821,14 +821,14 @@ class strings_column_wrapper : public detail::column_wrapper { auto [chars, offsets] = detail::make_chars_and_offsets(begin, end, v); auto [null_mask, null_count] = detail::make_null_mask_vector(v, v + num_strings); auto d_chars = cudf::detail::make_device_uvector_async( - chars, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()); + chars, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_offsets = std::make_unique( cudf::detail::make_device_uvector_async( - offsets, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()), + offsets, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()), rmm::device_buffer{}, 0); auto d_bitmask = cudf::detail::make_device_uvector_sync( - null_mask, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()); + null_mask, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()); wrapped = cudf::make_strings_column( num_strings, std::move(d_offsets), d_chars.release(), null_count, d_bitmask.release()); } @@ -1651,7 +1651,7 @@ class lists_column_wrapper : public detail::column_wrapper { auto data = children.empty() ? cudf::empty_like(expected_hierarchy) : cudf::concatenate(children, cudf::test::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // increment depth depth = expected_depth + 1; @@ -1756,7 +1756,7 @@ class lists_column_wrapper : public detail::column_wrapper { lists_column_view(expected_hierarchy).child()), col.null_count(), cudf::copy_bitmask( - col, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()), + col, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()), cudf::test::get_default_stream()); } diff --git a/cpp/include/cudf_test/stream_checking_resource_adaptor.hpp b/cpp/include/cudf_test/stream_checking_resource_adaptor.hpp index 417bbb3d9ab..b4001babe24 100644 --- a/cpp/include/cudf_test/stream_checking_resource_adaptor.hpp +++ b/cpp/include/cudf_test/stream_checking_resource_adaptor.hpp @@ -18,9 +18,9 @@ #include #include +#include #include -#include #include diff --git a/cpp/include/cudf_test/tdigest_utilities.cuh b/cpp/include/cudf_test/tdigest_utilities.cuh index 5fd2403b0f2..1758790cd64 100644 --- a/cpp/include/cudf_test/tdigest_utilities.cuh +++ b/cpp/include/cudf_test/tdigest_utilities.cuh @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include #include #include @@ -171,7 +171,7 @@ void tdigest_minmax_compare(cudf::tdigest::tdigest_column_view const& tdv, thrust::host_vector> h_spans; h_spans.push_back({input_values.begin(), static_cast(input_values.size())}); auto spans = cudf::detail::make_device_uvector_async( - h_spans, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + h_spans, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto expected_min = cudf::make_fixed_width_column( data_type{type_id::FLOAT64}, spans.size(), mask_state::UNALLOCATED); @@ -271,7 +271,7 @@ void tdigest_simple_all_nulls_aggregation(Func op) // NOTE: an empty tdigest column still has 1 row. auto expected = cudf::tdigest::detail::make_empty_tdigest_column( - cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(*result, *expected); } @@ -562,12 +562,12 @@ template void tdigest_merge_empty(MergeFunc merge_op) { // 3 empty tdigests all in the same group - auto a = cudf::tdigest::detail::make_empty_tdigest_column(cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); - auto b = cudf::tdigest::detail::make_empty_tdigest_column(cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); - auto c = cudf::tdigest::detail::make_empty_tdigest_column(cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + auto a = cudf::tdigest::detail::make_empty_tdigest_column( + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); + auto b = cudf::tdigest::detail::make_empty_tdigest_column( + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); + auto c = cudf::tdigest::detail::make_empty_tdigest_column( + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); std::vector cols; cols.push_back(*a); cols.push_back(*b); @@ -578,7 +578,7 @@ void tdigest_merge_empty(MergeFunc merge_op) auto result = merge_op(*values, delta); auto expected = cudf::tdigest::detail::make_empty_tdigest_column( - cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(*expected, *result); } diff --git a/cpp/include/cudf_test/testing_main.hpp b/cpp/include/cudf_test/testing_main.hpp index ed83ddabb00..272c91133f8 100644 --- a/cpp/include/cudf_test/testing_main.hpp +++ b/cpp/include/cudf_test/testing_main.hpp @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -30,7 +31,6 @@ #include #include #include -#include #include namespace CUDF_EXPORT cudf { @@ -161,7 +161,7 @@ inline auto make_memory_resource_adaptor(cxxopts::ParseResult const& cmd_opts) { auto const rmm_mode = cmd_opts["rmm_mode"].as(); auto resource = cudf::test::create_memory_resource(rmm_mode); - rmm::mr::set_current_device_resource(resource.get()); + cudf::set_current_device_resource(resource.get()); return resource; } @@ -178,7 +178,7 @@ inline auto make_memory_resource_adaptor(cxxopts::ParseResult const& cmd_opts) */ inline auto make_stream_mode_adaptor(cxxopts::ParseResult const& cmd_opts) { - auto resource = rmm::mr::get_current_device_resource(); + auto resource = cudf::get_current_device_resource_ref(); auto const stream_mode = cmd_opts["stream_mode"].as(); auto const stream_error_mode = cmd_opts["stream_error_mode"].as(); auto const error_on_invalid_stream = (stream_error_mode == "error"); @@ -186,7 +186,7 @@ inline auto make_stream_mode_adaptor(cxxopts::ParseResult const& cmd_opts) auto adaptor = cudf::test::stream_checking_resource_adaptor( resource, error_on_invalid_stream, check_default_stream); if ((stream_mode == "new_cudf_default") || (stream_mode == "new_testing_default")) { - rmm::mr::set_current_device_resource(&adaptor); + cudf::set_current_device_resource(&adaptor); } return adaptor; } diff --git a/cpp/include/doxygen_groups.h b/cpp/include/doxygen_groups.h index 7c395ffee42..5f3e7efbbfe 100644 --- a/cpp/include/doxygen_groups.h +++ b/cpp/include/doxygen_groups.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023, NVIDIA CORPORATION. + * Copyright (c) 2021-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. @@ -30,6 +30,7 @@ /** * @defgroup default_stream Default Stream + * @defgroup memory_resource Memory Resource Management * @defgroup cudf_classes Classes * @{ * @defgroup column_classes Column diff --git a/cpp/include/nvtext/byte_pair_encoding.hpp b/cpp/include/nvtext/byte_pair_encoding.hpp index 6559933f696..ab862df044d 100644 --- a/cpp/include/nvtext/byte_pair_encoding.hpp +++ b/cpp/include/nvtext/byte_pair_encoding.hpp @@ -21,8 +21,7 @@ #include #include #include - -#include +#include namespace CUDF_EXPORT nvtext { @@ -49,7 +48,7 @@ struct bpe_merge_pairs { */ bpe_merge_pairs(std::unique_ptr&& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Construct a new bpe merge pairs object @@ -60,7 +59,7 @@ struct bpe_merge_pairs { */ bpe_merge_pairs(cudf::strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); ~bpe_merge_pairs(); bpe_merge_pairs(); @@ -98,7 +97,7 @@ struct bpe_merge_pairs { std::unique_ptr load_merge_pairs( cudf::strings_column_view const& merge_pairs, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Byte pair encode the input strings. @@ -130,7 +129,7 @@ std::unique_ptr byte_pair_encoding( cudf::strings_column_view const& input, bpe_merge_pairs const& merges_pairs, cudf::string_scalar const& separator = cudf::string_scalar(" "), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/detail/generate_ngrams.hpp b/cpp/include/nvtext/detail/generate_ngrams.hpp index 7c49421560d..ae48fed4e79 100644 --- a/cpp/include/nvtext/detail/generate_ngrams.hpp +++ b/cpp/include/nvtext/detail/generate_ngrams.hpp @@ -15,10 +15,11 @@ */ #pragma once +#include + #include #include -#include namespace CUDF_EXPORT nvtext { namespace detail { diff --git a/cpp/include/nvtext/detail/load_hash_file.hpp b/cpp/include/nvtext/detail/load_hash_file.hpp index 438a4a9afdd..1334cbf47ea 100644 --- a/cpp/include/nvtext/detail/load_hash_file.hpp +++ b/cpp/include/nvtext/detail/load_hash_file.hpp @@ -16,11 +16,11 @@ #pragma once #include +#include #include #include -#include #include #include diff --git a/cpp/include/nvtext/detail/tokenize.hpp b/cpp/include/nvtext/detail/tokenize.hpp index 57ad008f1a9..5e5c78e993f 100644 --- a/cpp/include/nvtext/detail/tokenize.hpp +++ b/cpp/include/nvtext/detail/tokenize.hpp @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include namespace CUDF_EXPORT nvtext { namespace detail { diff --git a/cpp/include/nvtext/edit_distance.hpp b/cpp/include/nvtext/edit_distance.hpp index 102f2cffa18..723ba310a1e 100644 --- a/cpp/include/nvtext/edit_distance.hpp +++ b/cpp/include/nvtext/edit_distance.hpp @@ -19,8 +19,7 @@ #include #include #include - -#include +#include //! NVText APIs namespace CUDF_EXPORT nvtext { @@ -64,7 +63,7 @@ std::unique_ptr edit_distance( cudf::strings_column_view const& input, cudf::strings_column_view const& targets, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Compute the edit distance between all the strings in the input column. @@ -102,7 +101,7 @@ std::unique_ptr edit_distance( std::unique_ptr edit_distance_matrix( cudf::strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/generate_ngrams.hpp b/cpp/include/nvtext/generate_ngrams.hpp index ce79d985a49..54282b8ef3c 100644 --- a/cpp/include/nvtext/generate_ngrams.hpp +++ b/cpp/include/nvtext/generate_ngrams.hpp @@ -19,8 +19,7 @@ #include #include #include - -#include +#include namespace CUDF_EXPORT nvtext { /** @@ -62,7 +61,7 @@ std::unique_ptr generate_ngrams( cudf::size_type ngrams, cudf::string_scalar const& separator, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Generates ngrams of characters within each string @@ -91,7 +90,7 @@ std::unique_ptr generate_character_ngrams( cudf::strings_column_view const& input, cudf::size_type ngrams = 2, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Hashes ngrams of characters within each string @@ -126,7 +125,7 @@ std::unique_ptr hash_character_ngrams( cudf::strings_column_view const& input, cudf::size_type ngrams = 5, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/jaccard.hpp b/cpp/include/nvtext/jaccard.hpp index 3c3486c079e..e0b924ac658 100644 --- a/cpp/include/nvtext/jaccard.hpp +++ b/cpp/include/nvtext/jaccard.hpp @@ -18,8 +18,7 @@ #include #include #include - -#include +#include namespace CUDF_EXPORT nvtext { /** @@ -76,7 +75,7 @@ std::unique_ptr jaccard_index( cudf::strings_column_view const& input2, cudf::size_type width, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/minhash.hpp b/cpp/include/nvtext/minhash.hpp index fc28ecfb199..c83a4260c19 100644 --- a/cpp/include/nvtext/minhash.hpp +++ b/cpp/include/nvtext/minhash.hpp @@ -20,10 +20,9 @@ #include #include #include +#include #include -#include - namespace CUDF_EXPORT nvtext { /** * @addtogroup nvtext_minhash @@ -56,7 +55,7 @@ std::unique_ptr minhash( cudf::numeric_scalar seed = 0, cudf::size_type width = 4, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the minhash values for each string per seed @@ -88,7 +87,7 @@ std::unique_ptr minhash( cudf::device_span seeds, cudf::size_type width = 4, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the minhash value for each string @@ -117,7 +116,7 @@ std::unique_ptr minhash64( cudf::numeric_scalar seed = 0, cudf::size_type width = 4, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the minhash values for each string per seed @@ -149,7 +148,7 @@ std::unique_ptr minhash64( cudf::device_span seeds, cudf::size_type width = 4, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/ngrams_tokenize.hpp b/cpp/include/nvtext/ngrams_tokenize.hpp index 1048cd4abad..e3b3c23a7a9 100644 --- a/cpp/include/nvtext/ngrams_tokenize.hpp +++ b/cpp/include/nvtext/ngrams_tokenize.hpp @@ -19,8 +19,7 @@ #include #include #include - -#include +#include namespace CUDF_EXPORT nvtext { /** @@ -84,7 +83,7 @@ std::unique_ptr ngrams_tokenize( cudf::string_scalar const& delimiter, cudf::string_scalar const& separator, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/normalize.hpp b/cpp/include/nvtext/normalize.hpp index ec0b8981f8f..74325f4a406 100644 --- a/cpp/include/nvtext/normalize.hpp +++ b/cpp/include/nvtext/normalize.hpp @@ -18,8 +18,7 @@ #include #include #include - -#include +#include //! NVText APIs namespace CUDF_EXPORT nvtext { @@ -55,7 +54,7 @@ namespace CUDF_EXPORT nvtext { std::unique_ptr normalize_spaces( cudf::strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Normalizes strings characters for tokenizing. @@ -106,7 +105,7 @@ std::unique_ptr normalize_characters( cudf::strings_column_view const& input, bool do_lower_case, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/replace.hpp b/cpp/include/nvtext/replace.hpp index eedcd3976ca..bbd0503379b 100644 --- a/cpp/include/nvtext/replace.hpp +++ b/cpp/include/nvtext/replace.hpp @@ -19,8 +19,7 @@ #include #include #include - -#include +#include //! NVText APIs namespace CUDF_EXPORT nvtext { @@ -91,7 +90,7 @@ std::unique_ptr replace_tokens( cudf::strings_column_view const& replacements, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Removes tokens whose lengths are less than a specified number of characters. @@ -140,7 +139,7 @@ std::unique_ptr filter_tokens( cudf::string_scalar const& replacement = cudf::string_scalar{""}, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/stemmer.hpp b/cpp/include/nvtext/stemmer.hpp index 4607c42ceed..55a4124bfd0 100644 --- a/cpp/include/nvtext/stemmer.hpp +++ b/cpp/include/nvtext/stemmer.hpp @@ -19,8 +19,7 @@ #include #include #include - -#include +#include namespace CUDF_EXPORT nvtext { /** @@ -83,7 +82,7 @@ std::unique_ptr is_letter( letter_type ltype, cudf::size_type character_index, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns boolean column indicating if character at `indices[i]` of `input[i]` @@ -136,7 +135,7 @@ std::unique_ptr is_letter( letter_type ltype, cudf::column_view const& indices, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the Porter Stemmer measurements of a strings column. @@ -170,7 +169,7 @@ std::unique_ptr is_letter( std::unique_ptr porter_stemmer_measure( cudf::strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/subword_tokenize.hpp b/cpp/include/nvtext/subword_tokenize.hpp index b5636c8401b..c4210699975 100644 --- a/cpp/include/nvtext/subword_tokenize.hpp +++ b/cpp/include/nvtext/subword_tokenize.hpp @@ -19,8 +19,7 @@ #include #include #include - -#include +#include namespace CUDF_EXPORT nvtext { @@ -68,7 +67,7 @@ struct hashed_vocabulary { */ std::unique_ptr load_vocabulary_file( std::string const& filename_hashed_vocabulary, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Result object for the subword_tokenize functions. @@ -158,7 +157,7 @@ tokenizer_result subword_tokenize( uint32_t stride, bool do_lower_case, bool do_truncate, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/include/nvtext/tokenize.hpp b/cpp/include/nvtext/tokenize.hpp index 833b53efcde..e61601c6fea 100644 --- a/cpp/include/nvtext/tokenize.hpp +++ b/cpp/include/nvtext/tokenize.hpp @@ -19,8 +19,7 @@ #include #include #include - -#include +#include namespace CUDF_EXPORT nvtext { /** @@ -63,7 +62,7 @@ std::unique_ptr tokenize( cudf::strings_column_view const& input, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a single column of strings by tokenizing the input strings @@ -99,7 +98,7 @@ std::unique_ptr tokenize( cudf::strings_column_view const& input, cudf::strings_column_view const& delimiters, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the number of tokens in each string of a strings column. @@ -130,7 +129,7 @@ std::unique_ptr count_tokens( cudf::strings_column_view const& input, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the number of tokens in each string of a strings column @@ -162,7 +161,7 @@ std::unique_ptr count_tokens( cudf::strings_column_view const& input, cudf::strings_column_view const& delimiters, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns a single column of strings by converting each character to a string. @@ -188,7 +187,7 @@ std::unique_ptr count_tokens( std::unique_ptr character_tokenize( cudf::strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Creates a strings column from a strings column of tokens and an @@ -229,7 +228,7 @@ std::unique_ptr detokenize( cudf::column_view const& row_indices, cudf::string_scalar const& separator = cudf::string_scalar(" "), rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Vocabulary object to be used with nvtext::tokenize_with_vocabulary @@ -251,7 +250,7 @@ struct tokenize_vocabulary { */ tokenize_vocabulary(cudf::strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); ~tokenize_vocabulary(); struct tokenize_vocabulary_impl; @@ -274,7 +273,7 @@ struct tokenize_vocabulary { std::unique_ptr load_vocabulary( cudf::strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** * @brief Returns the token ids for the input string by looking up each delimited @@ -307,7 +306,7 @@ std::unique_ptr tokenize_with_vocabulary( cudf::string_scalar const& delimiter, cudf::size_type default_id = -1, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @} */ // end of tokenize group } // namespace CUDF_EXPORT nvtext diff --git a/cpp/src/binaryop/binaryop.cpp b/cpp/src/binaryop/binaryop.cpp index 25b0f68aaa8..a6c878efbbc 100644 --- a/cpp/src/binaryop/binaryop.cpp +++ b/cpp/src/binaryop/binaryop.cpp @@ -35,11 +35,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/binaryop/compiled/binary_ops.cu b/cpp/src/binaryop/compiled/binary_ops.cu index 7a0bc312434..3c558f1e264 100644 --- a/cpp/src/binaryop/compiled/binary_ops.cu +++ b/cpp/src/binaryop/compiled/binary_ops.cu @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -116,7 +116,7 @@ scalar_as_column_view::return_type scalar_as_column_view::operator() #include #include +#include #include -#include #include diff --git a/cpp/src/bitmask/null_mask.cu b/cpp/src/bitmask/null_mask.cu index d0faeea8336..4ca05f9c335 100644 --- a/cpp/src/bitmask/null_mask.cu +++ b/cpp/src/bitmask/null_mask.cu @@ -27,13 +27,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/column/column.cu b/cpp/src/column/column.cu index 90f719b9516..973b1ffd133 100644 --- a/cpp/src/column/column.cu +++ b/cpp/src/column/column.cu @@ -30,12 +30,12 @@ #include #include #include +#include #include #include #include #include -#include #include diff --git a/cpp/src/column/column_factories.cpp b/cpp/src/column/column_factories.cpp index 0260068d4db..482413d0ccb 100644 --- a/cpp/src/column/column_factories.cpp +++ b/cpp/src/column/column_factories.cpp @@ -23,10 +23,9 @@ #include #include #include +#include #include -#include - #include namespace cudf { diff --git a/cpp/src/column/column_factories.cu b/cpp/src/column/column_factories.cu index ad9c5e4d3a0..60405ae7af1 100644 --- a/cpp/src/column/column_factories.cu +++ b/cpp/src/column/column_factories.cu @@ -21,8 +21,7 @@ #include #include #include - -#include +#include #include #include diff --git a/cpp/src/copying/concatenate.cu b/cpp/src/copying/concatenate.cu index ac9931335ff..b8e140f1fa5 100644 --- a/cpp/src/copying/concatenate.cu +++ b/cpp/src/copying/concatenate.cu @@ -32,11 +32,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -82,7 +82,7 @@ auto create_device_views(host_span views, rmm::cuda_stream_vi [](auto const& col) { return *col; }); auto d_views = - make_device_uvector_async(device_views, stream, rmm::mr::get_current_device_resource()); + make_device_uvector_async(device_views, stream, cudf::get_current_device_resource_ref()); // Compute the partition offsets auto offsets = cudf::detail::make_host_vector(views.size() + 1, stream); @@ -94,7 +94,7 @@ auto create_device_views(host_span views, rmm::cuda_stream_vi [](auto const& col) { return col.size(); }, thrust::plus{}); auto d_offsets = - make_device_uvector_async(offsets, stream, rmm::mr::get_current_device_resource()); + make_device_uvector_async(offsets, stream, cudf::get_current_device_resource_ref()); auto const output_size = offsets.back(); return std::make_tuple( diff --git a/cpp/src/copying/contiguous_split.cu b/cpp/src/copying/contiguous_split.cu index 95544742fb7..15aa31ff5ee 100644 --- a/cpp/src/copying/contiguous_split.cu +++ b/cpp/src/copying/contiguous_split.cu @@ -28,10 +28,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -1939,8 +1939,8 @@ struct contiguous_split_state { std::transform(h_buf_sizes, h_buf_sizes + num_partitions, std::back_inserter(out_buffers), - [stream = stream, - mr = mr.value_or(rmm::mr::get_current_device_resource())](std::size_t bytes) { + [stream = stream, mr = mr.value_or(cudf::get_current_device_resource_ref())]( + std::size_t bytes) { return rmm::device_buffer{bytes, stream, mr}; }); } diff --git a/cpp/src/copying/copy.cpp b/cpp/src/copying/copy.cpp index bac8dbe5d95..d60fb5ce110 100644 --- a/cpp/src/copying/copy.cpp +++ b/cpp/src/copying/copy.cpp @@ -23,10 +23,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/copying/copy.cu b/cpp/src/copying/copy.cu index e86a1f8d6f1..e5e2514d035 100644 --- a/cpp/src/copying/copy.cu +++ b/cpp/src/copying/copy.cu @@ -25,13 +25,12 @@ #include #include #include +#include #include #include #include #include -#include -#include #include #include @@ -180,7 +179,7 @@ std::unique_ptr scatter_gather_based_if_else(cudf::column_view const& lh out_of_bounds_policy::DONT_CHECK, negative_index_policy::NOT_ALLOWED, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto result = cudf::detail::scatter( table_view{std::vector{scatter_src_lhs->get_column(0).view()}}, diff --git a/cpp/src/copying/copy_range.cu b/cpp/src/copying/copy_range.cu index dd18f99a3c8..bffb48a8ec0 100644 --- a/cpp/src/copying/copy_range.cu +++ b/cpp/src/copying/copy_range.cu @@ -31,11 +31,11 @@ #include #include #include +#include #include #include #include -#include #include @@ -100,7 +100,7 @@ struct out_of_place_copy_range_dispatch { cudf::size_type source_end, cudf::size_type target_begin, rmm::cuda_stream_view stream, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto p_ret = std::make_unique(target, stream, mr); if ((!p_ret->nullable()) && source.has_nulls(source_begin, source_end)) { @@ -157,7 +157,7 @@ std::unique_ptr out_of_place_copy_range_dispatch::operator()view()); auto source_matched = cudf::dictionary::detail::set_keys( - dict_source, target_view.keys(), stream, rmm::mr::get_current_device_resource()); + dict_source, target_view.keys(), stream, cudf::get_current_device_resource_ref()); auto const source_view = cudf::dictionary_column_view(source_matched->view()); // build the new indices by calling in_place_copy_range on just the indices diff --git a/cpp/src/copying/gather.cu b/cpp/src/copying/gather.cu index 5eb039419df..d1ab39d665d 100644 --- a/cpp/src/copying/gather.cu +++ b/cpp/src/copying/gather.cu @@ -23,9 +23,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/copying/get_element.cu b/cpp/src/copying/get_element.cu index b8860da479c..29a28f81d1a 100644 --- a/cpp/src/copying/get_element.cu +++ b/cpp/src/copying/get_element.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include #include diff --git a/cpp/src/copying/pack.cpp b/cpp/src/copying/pack.cpp index 819ad593c0a..1282eec6c44 100644 --- a/cpp/src/copying/pack.cpp +++ b/cpp/src/copying/pack.cpp @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace detail { diff --git a/cpp/src/copying/purge_nonempty_nulls.cu b/cpp/src/copying/purge_nonempty_nulls.cu index 581d0a00924..684deabf038 100644 --- a/cpp/src/copying/purge_nonempty_nulls.cu +++ b/cpp/src/copying/purge_nonempty_nulls.cu @@ -18,8 +18,7 @@ #include #include #include - -#include +#include #include #include diff --git a/cpp/src/copying/reverse.cu b/cpp/src/copying/reverse.cu index d3d42e35e26..effbb59f223 100644 --- a/cpp/src/copying/reverse.cu +++ b/cpp/src/copying/reverse.cu @@ -21,12 +21,11 @@ #include #include #include +#include #include #include #include -#include -#include #include #include diff --git a/cpp/src/copying/sample.cu b/cpp/src/copying/sample.cu index ba00527f6b6..dc03856c7cf 100644 --- a/cpp/src/copying/sample.cu +++ b/cpp/src/copying/sample.cu @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/copying/scatter.cu b/cpp/src/copying/scatter.cu index 993ee074f14..cd14eb96ec4 100644 --- a/cpp/src/copying/scatter.cu +++ b/cpp/src/copying/scatter.cu @@ -33,10 +33,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -198,7 +198,7 @@ struct column_scalar_scatterer_impl { mr); auto dict_view = dictionary_column_view(dict_target->view()); auto scalar_index = dictionary::detail::get_index( - dict_view, source.get(), stream, rmm::mr::get_current_device_resource()); + dict_view, source.get(), stream, cudf::get_current_device_resource_ref()); auto scalar_iter = thrust::make_permutation_iterator( indexalator_factory::make_input_iterator(*scalar_index), thrust::make_constant_iterator(0)); auto new_indices = std::make_unique(dict_view.get_indices_annotated(), stream, mr); @@ -271,7 +271,7 @@ struct column_scalar_scatterer_impl { auto scatter_functor = column_scalar_scatterer{}; auto fields_iter_begin = make_counting_transform_iterator(0, [&](auto const& i) { auto row_slr = detail::get_element( - typed_s->view().column(i), 0, stream, rmm::mr::get_current_device_resource()); + typed_s->view().column(i), 0, stream, cudf::get_current_device_resource_ref()); return type_dispatcher(row_slr->type(), scatter_functor, *row_slr, @@ -416,7 +416,7 @@ std::unique_ptr boolean_mask_scatter(column_view const& input, // The scatter map is actually a table with only one column, which is scatter map. auto scatter_map = detail::apply_boolean_mask( - table_view{{indices->view()}}, boolean_mask, stream, rmm::mr::get_current_device_resource()); + table_view{{indices->view()}}, boolean_mask, stream, cudf::get_current_device_resource_ref()); auto output_table = detail::scatter( table_view{{input}}, scatter_map->get_column(0).view(), table_view{{target}}, stream, mr); diff --git a/cpp/src/copying/segmented_shift.cu b/cpp/src/copying/segmented_shift.cu index b7abc60f240..6ea5c5ab38a 100644 --- a/cpp/src/copying/segmented_shift.cu +++ b/cpp/src/copying/segmented_shift.cu @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/copying/shift.cu b/cpp/src/copying/shift.cu index 91254f21170..674f6dbd28a 100644 --- a/cpp/src/copying/shift.cu +++ b/cpp/src/copying/shift.cu @@ -25,13 +25,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/datetime/datetime_ops.cu b/cpp/src/datetime/datetime_ops.cu index 7629cad79a9..fd9a6b8f5fe 100644 --- a/cpp/src/datetime/datetime_ops.cu +++ b/cpp/src/datetime/datetime_ops.cu @@ -29,13 +29,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/datetime/timezone.cpp b/cpp/src/datetime/timezone.cpp index 7ca1b51df98..6498a5e6c55 100644 --- a/cpp/src/datetime/timezone.cpp +++ b/cpp/src/datetime/timezone.cpp @@ -18,8 +18,7 @@ #include #include #include - -#include +#include #include #include diff --git a/cpp/src/dictionary/add_keys.cu b/cpp/src/dictionary/add_keys.cu index 0ed9006f88b..565055009ba 100644 --- a/cpp/src/dictionary/add_keys.cu +++ b/cpp/src/dictionary/add_keys.cu @@ -30,11 +30,9 @@ #include #include #include +#include #include -#include -#include - namespace cudf { namespace dictionary { namespace detail { @@ -61,7 +59,7 @@ std::unique_ptr add_keys(dictionary_column_view const& dictionary_column // first, concatenate the keys together // [a,b,c,d,f] + [d,b,e] = [a,b,c,d,f,d,b,e] auto combined_keys = cudf::detail::concatenate( - std::vector{old_keys, new_keys}, stream, rmm::mr::get_current_device_resource()); + std::vector{old_keys, new_keys}, stream, cudf::get_current_device_resource_ref()); // Drop duplicates from the combined keys, then sort the result. // sort(distinct([a,b,c,d,f,d,b,e])) = [a,b,c,d,e,f] diff --git a/cpp/src/dictionary/decode.cu b/cpp/src/dictionary/decode.cu index 9f05593fc40..fb013586999 100644 --- a/cpp/src/dictionary/decode.cu +++ b/cpp/src/dictionary/decode.cu @@ -23,9 +23,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace dictionary { diff --git a/cpp/src/dictionary/detail/concatenate.cu b/cpp/src/dictionary/detail/concatenate.cu index 72828309425..b3a8bb4cd20 100644 --- a/cpp/src/dictionary/detail/concatenate.cu +++ b/cpp/src/dictionary/detail/concatenate.cu @@ -27,13 +27,12 @@ #include #include #include +#include #include #include #include #include -#include -#include #include #include @@ -120,7 +119,7 @@ struct compute_children_offsets_fn { return offsets_pair{lhs.first + rhs.first, lhs.second + rhs.second}; }); return cudf::detail::make_device_uvector_sync( - offsets, stream, rmm::mr::get_current_device_resource()); + offsets, stream, cudf::get_current_device_resource_ref()); } private: @@ -229,7 +228,7 @@ std::unique_ptr concatenate(host_span columns, return keys; }); auto all_keys = - cudf::detail::concatenate(keys_views, stream, rmm::mr::get_current_device_resource()); + cudf::detail::concatenate(keys_views, stream, cudf::get_current_device_resource_ref()); // sort keys and remove duplicates; // this becomes the keys child for the output dictionary column diff --git a/cpp/src/dictionary/detail/merge.cu b/cpp/src/dictionary/detail/merge.cu index c65aa5d1101..0af71397196 100644 --- a/cpp/src/dictionary/detail/merge.cu +++ b/cpp/src/dictionary/detail/merge.cu @@ -22,10 +22,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/dictionary/dictionary_factories.cu b/cpp/src/dictionary/dictionary_factories.cu index 0617d71fa51..3e0c98d36ea 100644 --- a/cpp/src/dictionary/dictionary_factories.cu +++ b/cpp/src/dictionary/dictionary_factories.cu @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include namespace cudf { namespace { diff --git a/cpp/src/dictionary/encode.cu b/cpp/src/dictionary/encode.cu index ff29d83b80a..c8ccb511e8f 100644 --- a/cpp/src/dictionary/encode.cu +++ b/cpp/src/dictionary/encode.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace dictionary { diff --git a/cpp/src/dictionary/remove_keys.cu b/cpp/src/dictionary/remove_keys.cu index 35387efa56b..119f43a4ae9 100644 --- a/cpp/src/dictionary/remove_keys.cu +++ b/cpp/src/dictionary/remove_keys.cu @@ -27,11 +27,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/dictionary/replace.cu b/cpp/src/dictionary/replace.cu index bc17dfd4bab..fe0b103cc55 100644 --- a/cpp/src/dictionary/replace.cu +++ b/cpp/src/dictionary/replace.cu @@ -25,10 +25,10 @@ #include #include #include +#include #include #include -#include namespace cudf { namespace dictionary { @@ -132,7 +132,7 @@ std::unique_ptr replace_nulls(dictionary_column_view const& input, input, make_column_from_scalar(replacement, 1, stream)->view(), stream, mr); auto const input_view = dictionary_column_view(input_matched->view()); auto const scalar_index = - get_index(input_view, replacement, stream, rmm::mr::get_current_device_resource()); + get_index(input_view, replacement, stream, cudf::get_current_device_resource_ref()); // now build the new indices by doing replace-null on the updated indices auto const input_indices = input_view.get_indices_annotated(); diff --git a/cpp/src/dictionary/search.cu b/cpp/src/dictionary/search.cu index 231619836f9..04e2c17635d 100644 --- a/cpp/src/dictionary/search.cu +++ b/cpp/src/dictionary/search.cu @@ -20,13 +20,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/dictionary/set_keys.cu b/cpp/src/dictionary/set_keys.cu index cf40fda5971..be5c3dd6a26 100644 --- a/cpp/src/dictionary/set_keys.cu +++ b/cpp/src/dictionary/set_keys.cu @@ -31,11 +31,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -185,7 +185,7 @@ std::vector> match_dictionaries( { std::vector keys(input.size()); std::transform(input.begin(), input.end(), keys.begin(), [](auto& col) { return col.keys(); }); - auto new_keys = cudf::detail::concatenate(keys, stream, rmm::mr::get_current_device_resource()); + auto new_keys = cudf::detail::concatenate(keys, stream, cudf::get_current_device_resource_ref()); auto keys_view = new_keys->view(); std::vector> result(input.size()); std::transform(input.begin(), input.end(), result.begin(), [keys_view, mr, stream](auto& col) { diff --git a/cpp/src/filling/calendrical_month_sequence.cu b/cpp/src/filling/calendrical_month_sequence.cu index f984f307ddd..f5ad211bd0d 100644 --- a/cpp/src/filling/calendrical_month_sequence.cu +++ b/cpp/src/filling/calendrical_month_sequence.cu @@ -20,11 +20,11 @@ #include #include #include +#include #include #include #include -#include namespace cudf { namespace detail { diff --git a/cpp/src/filling/fill.cu b/cpp/src/filling/fill.cu index 1fc9ed31c09..cfb209c0569 100644 --- a/cpp/src/filling/fill.cu +++ b/cpp/src/filling/fill.cu @@ -32,12 +32,11 @@ #include #include #include +#include #include #include #include -#include -#include #include @@ -175,7 +174,7 @@ std::unique_ptr out_of_place_fill_range_dispatch::operator()view(), value, stream, rmm::mr::get_current_device_resource()); + target_matched->view(), value, stream, cudf::get_current_device_resource_ref()); // now call fill using just the indices column and the new index auto new_indices = cudf::type_dispatcher(target_indices.type(), diff --git a/cpp/src/filling/repeat.cu b/cpp/src/filling/repeat.cu index ff4005d9366..2e78954d78a 100644 --- a/cpp/src/filling/repeat.cu +++ b/cpp/src/filling/repeat.cu @@ -27,13 +27,12 @@ #include #include #include +#include #include #include #include #include -#include -#include #include #include diff --git a/cpp/src/filling/sequence.cu b/cpp/src/filling/sequence.cu index ee1745b8498..d8fd993bbd1 100644 --- a/cpp/src/filling/sequence.cu +++ b/cpp/src/filling/sequence.cu @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/common/utils.hpp b/cpp/src/groupby/common/utils.hpp index 82c3c08b501..80849357811 100644 --- a/cpp/src/groupby/common/utils.hpp +++ b/cpp/src/groupby/common/utils.hpp @@ -18,10 +18,9 @@ #include #include +#include #include -#include - #include #include diff --git a/cpp/src/groupby/groupby.cu b/cpp/src/groupby/groupby.cu index e43dfcb4d98..cc0682b68b9 100644 --- a/cpp/src/groupby/groupby.cu +++ b/cpp/src/groupby/groupby.cu @@ -35,12 +35,11 @@ #include #include #include +#include #include #include #include -#include -#include #include @@ -284,7 +283,7 @@ std::pair, std::unique_ptr
> groupby::replace_nulls std::back_inserter(results), [&](auto i) { bool nullable = values.column(i).nullable(); - auto final_mr = nullable ? rmm::mr::get_current_device_resource() : mr; + auto final_mr = nullable ? cudf::get_current_device_resource_ref() : mr; auto grouped_values = helper().grouped_values(values.column(i), stream, final_mr); return nullable ? detail::group_replace_nulls( *grouped_values, group_labels, replace_policies[i], stream, mr) @@ -331,7 +330,7 @@ std::pair, std::unique_ptr
> groupby::shift( std::back_inserter(results), [&](size_type i) { auto grouped_values = - helper().grouped_values(values.column(i), stream, rmm::mr::get_current_device_resource()); + helper().grouped_values(values.column(i), stream, cudf::get_current_device_resource_ref()); return cudf::detail::segmented_shift( grouped_values->view(), group_offsets, offsets[i], fill_values[i].get(), stream, mr); }); diff --git a/cpp/src/groupby/hash/groupby.cu b/cpp/src/groupby/hash/groupby.cu index 35161eada28..f9a80a048b5 100644 --- a/cpp/src/groupby/hash/groupby.cu +++ b/cpp/src/groupby/hash/groupby.cu @@ -39,11 +39,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -401,7 +401,7 @@ void sparse_to_dense_results(table_view const& keys, rmm::device_async_resource_ref mr) { auto row_bitmask = - cudf::detail::bitmask_and(keys, stream, rmm::mr::get_current_device_resource()).first; + cudf::detail::bitmask_and(keys, stream, cudf::get_current_device_resource_ref()).first; bool skip_key_rows_with_nulls = keys_have_nulls and include_null_keys == null_policy::EXCLUDE; bitmask_type const* row_bitmask_ptr = skip_key_rows_with_nulls ? static_cast(row_bitmask.data()) : nullptr; @@ -475,13 +475,13 @@ void compute_single_pass_aggs(table_view const& keys, auto d_sparse_table = mutable_table_device_view::create(sparse_table, stream); auto d_values = table_device_view::create(flattened_values, stream); auto const d_aggs = cudf::detail::make_device_uvector_async( - agg_kinds, stream, rmm::mr::get_current_device_resource()); + agg_kinds, stream, cudf::get_current_device_resource_ref()); auto const skip_key_rows_with_nulls = keys_have_nulls and include_null_keys == null_policy::EXCLUDE; auto row_bitmask = skip_key_rows_with_nulls - ? cudf::detail::bitmask_and(keys, stream, rmm::mr::get_current_device_resource()).first + ? cudf::detail::bitmask_and(keys, stream, cudf::get_current_device_resource_ref()).first : rmm::device_buffer{}; thrust::for_each_n( diff --git a/cpp/src/groupby/sort/aggregate.cpp b/cpp/src/groupby/sort/aggregate.cpp index ba59616babe..a9085a1f1fd 100644 --- a/cpp/src/groupby/sort/aggregate.cpp +++ b/cpp/src/groupby/sort/aggregate.cpp @@ -35,9 +35,9 @@ #include #include #include +#include #include -#include #include #include @@ -435,7 +435,7 @@ void aggregate_result_functor::operator()(aggregation helper.num_groups(stream), null_handling, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const nulls_equal = dynamic_cast(agg)._nulls_equal; auto const nans_equal = @@ -507,7 +507,7 @@ void aggregate_result_functor::operator()(aggregation c helper.group_offsets(stream), helper.num_groups(stream), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const& merge_sets_agg = dynamic_cast(agg); cache.add_result(values, agg, diff --git a/cpp/src/groupby/sort/functors.hpp b/cpp/src/groupby/sort/functors.hpp index 057085fe85d..a13866802be 100644 --- a/cpp/src/groupby/sort/functors.hpp +++ b/cpp/src/groupby/sort/functors.hpp @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include #include diff --git a/cpp/src/groupby/sort/group_argmax.cu b/cpp/src/groupby/sort/group_argmax.cu index a1d197b1307..7dce341130e 100644 --- a/cpp/src/groupby/sort/group_argmax.cu +++ b/cpp/src/groupby/sort/group_argmax.cu @@ -17,10 +17,10 @@ #include "groupby/sort/group_single_pass_reduction_util.cuh" #include +#include #include #include -#include #include diff --git a/cpp/src/groupby/sort/group_argmin.cu b/cpp/src/groupby/sort/group_argmin.cu index 03243bef836..c4bed330b9f 100644 --- a/cpp/src/groupby/sort/group_argmin.cu +++ b/cpp/src/groupby/sort/group_argmin.cu @@ -17,10 +17,10 @@ #include "groupby/sort/group_single_pass_reduction_util.cuh" #include +#include #include #include -#include #include diff --git a/cpp/src/groupby/sort/group_collect.cu b/cpp/src/groupby/sort/group_collect.cu index 555c5d3ad41..a1cac7ee3bc 100644 --- a/cpp/src/groupby/sort/group_collect.cu +++ b/cpp/src/groupby/sort/group_collect.cu @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_correlation.cu b/cpp/src/groupby/sort/group_correlation.cu index 152aa98a8b9..7f2102dc8ee 100644 --- a/cpp/src/groupby/sort/group_correlation.cu +++ b/cpp/src/groupby/sort/group_correlation.cu @@ -21,12 +21,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_count.cu b/cpp/src/groupby/sort/group_count.cu index 56a4943e272..2e1cb9591c4 100644 --- a/cpp/src/groupby/sort/group_count.cu +++ b/cpp/src/groupby/sort/group_count.cu @@ -18,11 +18,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_count_scan.cu b/cpp/src/groupby/sort/group_count_scan.cu index c076f21e1f8..5897cc341d4 100644 --- a/cpp/src/groupby/sort/group_count_scan.cu +++ b/cpp/src/groupby/sort/group_count_scan.cu @@ -17,11 +17,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_histogram.cu b/cpp/src/groupby/sort/group_histogram.cu index 1000ec0d470..861d801a070 100644 --- a/cpp/src/groupby/sort/group_histogram.cu +++ b/cpp/src/groupby/sort/group_histogram.cu @@ -23,10 +23,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/groupby/sort/group_m2.cu b/cpp/src/groupby/sort/group_m2.cu index 77f33486284..a17a4433d05 100644 --- a/cpp/src/groupby/sort/group_m2.cu +++ b/cpp/src/groupby/sort/group_m2.cu @@ -21,13 +21,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_max.cu b/cpp/src/groupby/sort/group_max.cu index 60b071c25ff..06a759dd25a 100644 --- a/cpp/src/groupby/sort/group_max.cu +++ b/cpp/src/groupby/sort/group_max.cu @@ -16,8 +16,9 @@ #include "groupby/sort/group_single_pass_reduction_util.cuh" +#include + #include -#include namespace cudf { namespace groupby { diff --git a/cpp/src/groupby/sort/group_max_scan.cu b/cpp/src/groupby/sort/group_max_scan.cu index 270059cfcad..21e439a2253 100644 --- a/cpp/src/groupby/sort/group_max_scan.cu +++ b/cpp/src/groupby/sort/group_max_scan.cu @@ -16,8 +16,9 @@ #include "groupby/sort/group_scan_util.cuh" +#include + #include -#include namespace cudf { namespace groupby { diff --git a/cpp/src/groupby/sort/group_merge_lists.cu b/cpp/src/groupby/sort/group_merge_lists.cu index 92cce1aa00e..009530a9915 100644 --- a/cpp/src/groupby/sort/group_merge_lists.cu +++ b/cpp/src/groupby/sort/group_merge_lists.cu @@ -16,11 +16,11 @@ #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/groupby/sort/group_merge_m2.cu b/cpp/src/groupby/sort/group_merge_m2.cu index 4ad8fa5ff07..746c3fe3962 100644 --- a/cpp/src/groupby/sort/group_merge_m2.cu +++ b/cpp/src/groupby/sort/group_merge_m2.cu @@ -20,12 +20,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_min.cu b/cpp/src/groupby/sort/group_min.cu index 22aaf664168..f86aa14430a 100644 --- a/cpp/src/groupby/sort/group_min.cu +++ b/cpp/src/groupby/sort/group_min.cu @@ -16,8 +16,9 @@ #include "groupby/sort/group_single_pass_reduction_util.cuh" +#include + #include -#include namespace cudf { namespace groupby { diff --git a/cpp/src/groupby/sort/group_min_scan.cu b/cpp/src/groupby/sort/group_min_scan.cu index 4ddc10a2e5a..96b7ad95a19 100644 --- a/cpp/src/groupby/sort/group_min_scan.cu +++ b/cpp/src/groupby/sort/group_min_scan.cu @@ -16,8 +16,9 @@ #include "groupby/sort/group_scan_util.cuh" +#include + #include -#include namespace cudf { namespace groupby { diff --git a/cpp/src/groupby/sort/group_nth_element.cu b/cpp/src/groupby/sort/group_nth_element.cu index 1bc1eef908c..a4752b6948b 100644 --- a/cpp/src/groupby/sort/group_nth_element.cu +++ b/cpp/src/groupby/sort/group_nth_element.cu @@ -22,11 +22,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_nunique.cu b/cpp/src/groupby/sort/group_nunique.cu index de11e70719a..348ab366762 100644 --- a/cpp/src/groupby/sort/group_nunique.cu +++ b/cpp/src/groupby/sort/group_nunique.cu @@ -18,11 +18,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_product.cu b/cpp/src/groupby/sort/group_product.cu index 83ca1059325..5e81c8513c8 100644 --- a/cpp/src/groupby/sort/group_product.cu +++ b/cpp/src/groupby/sort/group_product.cu @@ -17,10 +17,10 @@ #include "groupby/sort/group_single_pass_reduction_util.cuh" #include +#include #include #include -#include namespace cudf { namespace groupby { diff --git a/cpp/src/groupby/sort/group_product_scan.cu b/cpp/src/groupby/sort/group_product_scan.cu index 40c53ceeff1..016f293ac5b 100644 --- a/cpp/src/groupby/sort/group_product_scan.cu +++ b/cpp/src/groupby/sort/group_product_scan.cu @@ -16,8 +16,9 @@ #include "groupby/sort/group_scan_util.cuh" +#include + #include -#include namespace cudf { namespace groupby { diff --git a/cpp/src/groupby/sort/group_quantiles.cu b/cpp/src/groupby/sort/group_quantiles.cu index 3156dfaadd0..82d557b9f7e 100644 --- a/cpp/src/groupby/sort/group_quantiles.cu +++ b/cpp/src/groupby/sort/group_quantiles.cu @@ -24,12 +24,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -165,7 +165,7 @@ std::unique_ptr group_quantiles(column_view const& values, rmm::device_async_resource_ref mr) { auto dv_quantiles = cudf::detail::make_device_uvector_async( - quantiles, stream, rmm::mr::get_current_device_resource()); + quantiles, stream, cudf::get_current_device_resource_ref()); auto values_type = cudf::is_dictionary(values.type()) ? dictionary_column_view(values).keys().type() diff --git a/cpp/src/groupby/sort/group_rank_scan.cu b/cpp/src/groupby/sort/group_rank_scan.cu index 0b65889f127..65bd5ac408f 100644 --- a/cpp/src/groupby/sort/group_rank_scan.cu +++ b/cpp/src/groupby/sort/group_rank_scan.cu @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -226,13 +226,13 @@ std::unique_ptr average_rank_scan(column_view const& grouped_values, group_labels, group_offsets, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto min_rank = min_rank_scan(grouped_values, value_order, group_labels, group_offsets, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto ranks = make_fixed_width_column( data_type{type_to_id()}, group_labels.size(), mask_state::UNALLOCATED, stream, mr); auto mutable_ranks = ranks->mutable_view(); diff --git a/cpp/src/groupby/sort/group_reductions.hpp b/cpp/src/groupby/sort/group_reductions.hpp index 5e76dc3135a..f8a531094c6 100644 --- a/cpp/src/groupby/sort/group_reductions.hpp +++ b/cpp/src/groupby/sort/group_reductions.hpp @@ -18,10 +18,10 @@ #include #include +#include #include #include -#include #include diff --git a/cpp/src/groupby/sort/group_replace_nulls.cu b/cpp/src/groupby/sort/group_replace_nulls.cu index 566507da230..088ed05e5eb 100644 --- a/cpp/src/groupby/sort/group_replace_nulls.cu +++ b/cpp/src/groupby/sort/group_replace_nulls.cu @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_scan.hpp b/cpp/src/groupby/sort/group_scan.hpp index 6f2daae5f9d..b5d8ce23a97 100644 --- a/cpp/src/groupby/sort/group_scan.hpp +++ b/cpp/src/groupby/sort/group_scan.hpp @@ -18,10 +18,10 @@ #include #include +#include #include #include -#include #include diff --git a/cpp/src/groupby/sort/group_scan_util.cuh b/cpp/src/groupby/sort/group_scan_util.cuh index b360ba2c45d..86835ea8a67 100644 --- a/cpp/src/groupby/sort/group_scan_util.cuh +++ b/cpp/src/groupby/sort/group_scan_util.cuh @@ -29,12 +29,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_single_pass_reduction_util.cuh b/cpp/src/groupby/sort/group_single_pass_reduction_util.cuh index 5e892710d3b..2358f47bbbb 100644 --- a/cpp/src/groupby/sort/group_single_pass_reduction_util.cuh +++ b/cpp/src/groupby/sort/group_single_pass_reduction_util.cuh @@ -26,11 +26,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_std.cu b/cpp/src/groupby/sort/group_std.cu index 70f64186f21..86ee20dbbe2 100644 --- a/cpp/src/groupby/sort/group_std.cu +++ b/cpp/src/groupby/sort/group_std.cu @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -29,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/cpp/src/groupby/sort/group_sum.cu b/cpp/src/groupby/sort/group_sum.cu index 316b6f395bb..fbbc9b5fd15 100644 --- a/cpp/src/groupby/sort/group_sum.cu +++ b/cpp/src/groupby/sort/group_sum.cu @@ -17,10 +17,10 @@ #include "groupby/sort/group_single_pass_reduction_util.cuh" #include +#include #include #include -#include namespace cudf { namespace groupby { diff --git a/cpp/src/groupby/sort/group_sum_scan.cu b/cpp/src/groupby/sort/group_sum_scan.cu index 01c4d0c2c4a..d3af8c8794a 100644 --- a/cpp/src/groupby/sort/group_sum_scan.cu +++ b/cpp/src/groupby/sort/group_sum_scan.cu @@ -16,8 +16,9 @@ #include "groupby/sort/group_scan_util.cuh" +#include + #include -#include namespace cudf { namespace groupby { diff --git a/cpp/src/groupby/sort/scan.cpp b/cpp/src/groupby/sort/scan.cpp index f211c61b3b7..62bceccdf5f 100644 --- a/cpp/src/groupby/sort/scan.cpp +++ b/cpp/src/groupby/sort/scan.cpp @@ -33,9 +33,9 @@ #include #include #include +#include #include -#include #include @@ -145,7 +145,7 @@ void scan_result_functor::operator()(aggregation const& agg) return cudf::detail::sequence(group_labels.size(), *cudf::make_fixed_width_scalar(size_type{0}, stream), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); } else { auto sort_order = (rank_agg._method == rank_method::FIRST ? cudf::detail::stable_sorted_order : cudf::detail::sorted_order); @@ -153,7 +153,7 @@ void scan_result_functor::operator()(aggregation const& agg) {order::ASCENDING, rank_agg._column_order}, {null_order::AFTER, rank_agg._null_precedence}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); } }(); @@ -172,18 +172,18 @@ void scan_result_functor::operator()(aggregation const& agg) helper.group_labels(stream), helper.group_offsets(stream), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); if (rank_agg._percentage != rank_percentage::NONE) { auto count = get_grouped_values().nullable() and rank_agg._null_handling == null_policy::EXCLUDE ? detail::group_count_valid(get_grouped_values(), helper.group_labels(stream), helper.num_groups(stream), stream, - rmm::mr::get_current_device_resource()) + cudf::get_current_device_resource_ref()) : detail::group_count_all(helper.group_offsets(stream), helper.num_groups(stream), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); result = detail::group_rank_to_percentage(rank_agg._method, rank_agg._percentage, *result, diff --git a/cpp/src/groupby/sort/sort_helper.cu b/cpp/src/groupby/sort/sort_helper.cu index 4da1da089cd..35e3e05a364 100644 --- a/cpp/src/groupby/sort/sort_helper.cu +++ b/cpp/src/groupby/sort/sort_helper.cu @@ -31,11 +31,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -100,7 +100,7 @@ column_view sort_groupby_helper::key_sort_order(rmm::cuda_stream_view stream) numeric_scalar(0, true, stream), numeric_scalar(1, true, stream), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return sliced_key_sorted_order(); } @@ -109,7 +109,7 @@ column_view sort_groupby_helper::key_sort_order(rmm::cuda_stream_view stream) ? std::vector(_keys.num_columns(), null_order::AFTER) : _null_precedence; _key_sorted_order = cudf::detail::stable_sorted_order( - _keys, {}, precedence, stream, rmm::mr::get_current_device_resource()); + _keys, {}, precedence, stream, cudf::get_current_device_resource_ref()); } else { // Pandas style // Temporarily prepend the keys table with a column that indicates the // presence of a null value within a row. This allows moving all rows that @@ -125,7 +125,7 @@ column_view sort_groupby_helper::key_sort_order(rmm::cuda_stream_view stream) }(); _key_sorted_order = cudf::detail::stable_sorted_order( - augmented_keys, {}, precedence, stream, rmm::mr::get_current_device_resource()); + augmented_keys, {}, precedence, stream, cudf::get_current_device_resource_ref()); // All rows with one or more null values are at the end of the resulting sorted order. } @@ -223,7 +223,7 @@ column_view sort_groupby_helper::unsorted_keys_labels(rmm::cuda_stream_view stre scatter_map, table_view({temp_labels->view()}), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); _unsorted_keys_labels = std::move(t_unsorted_keys_labels->release()[0]); @@ -235,13 +235,13 @@ column_view sort_groupby_helper::keys_bitmask_column(rmm::cuda_stream_view strea if (_keys_bitmask_column) return _keys_bitmask_column->view(); auto [row_bitmask, null_count] = - cudf::detail::bitmask_and(_keys, stream, rmm::mr::get_current_device_resource()); + cudf::detail::bitmask_and(_keys, stream, cudf::get_current_device_resource_ref()); auto const zero = numeric_scalar(0, true, stream); // Create a temporary variable and only set _keys_bitmask_column right before the return. // This way, a 2nd (parallel) call to this will not be given a partially created object. auto keys_bitmask_column = cudf::detail::sequence( - _keys.num_rows(), zero, zero, stream, rmm::mr::get_current_device_resource()); + _keys.num_rows(), zero, zero, stream, cudf::get_current_device_resource_ref()); keys_bitmask_column->set_null_mask(std::move(row_bitmask), null_count); _keys_bitmask_column = std::move(keys_bitmask_column); diff --git a/cpp/src/hash/md5_hash.cu b/cpp/src/hash/md5_hash.cu index 0b559e8e86c..c7bfd4aecf4 100644 --- a/cpp/src/hash/md5_hash.cu +++ b/cpp/src/hash/md5_hash.cu @@ -25,11 +25,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/hash/murmurhash3_x64_128.cu b/cpp/src/hash/murmurhash3_x64_128.cu index 6c91532a193..090bd92af8c 100644 --- a/cpp/src/hash/murmurhash3_x64_128.cu +++ b/cpp/src/hash/murmurhash3_x64_128.cu @@ -19,10 +19,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/hash/murmurhash3_x86_32.cu b/cpp/src/hash/murmurhash3_x86_32.cu index eac72f5d995..dd7b19633be 100644 --- a/cpp/src/hash/murmurhash3_x86_32.cu +++ b/cpp/src/hash/murmurhash3_x86_32.cu @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/hash/sha1_hash.cu b/cpp/src/hash/sha1_hash.cu index f7609eb26af..3a0c442ed16 100644 --- a/cpp/src/hash/sha1_hash.cu +++ b/cpp/src/hash/sha1_hash.cu @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/hash/sha224_hash.cu b/cpp/src/hash/sha224_hash.cu index cf04504a489..3ac3c5dbbba 100644 --- a/cpp/src/hash/sha224_hash.cu +++ b/cpp/src/hash/sha224_hash.cu @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/hash/sha256_hash.cu b/cpp/src/hash/sha256_hash.cu index 664913c0f4c..8036308f09e 100644 --- a/cpp/src/hash/sha256_hash.cu +++ b/cpp/src/hash/sha256_hash.cu @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/hash/sha384_hash.cu b/cpp/src/hash/sha384_hash.cu index 92192f501ec..30fe181d55b 100644 --- a/cpp/src/hash/sha384_hash.cu +++ b/cpp/src/hash/sha384_hash.cu @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/hash/sha512_hash.cu b/cpp/src/hash/sha512_hash.cu index 244206aeeb9..fd74f38423b 100644 --- a/cpp/src/hash/sha512_hash.cu +++ b/cpp/src/hash/sha512_hash.cu @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/hash/sha_hash.cuh b/cpp/src/hash/sha_hash.cuh index 6976241057e..ebaec8e2775 100644 --- a/cpp/src/hash/sha_hash.cuh +++ b/cpp/src/hash/sha_hash.cuh @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/hash/xxhash_64.cu b/cpp/src/hash/xxhash_64.cu index 4366c12b453..fad8383210b 100644 --- a/cpp/src/hash/xxhash_64.cu +++ b/cpp/src/hash/xxhash_64.cu @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/interop/arrow_utilities.cpp b/cpp/src/interop/arrow_utilities.cpp index 3776daf41aa..a99262fb3bf 100644 --- a/cpp/src/interop/arrow_utilities.cpp +++ b/cpp/src/interop/arrow_utilities.cpp @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/cpp/src/interop/arrow_utilities.hpp b/cpp/src/interop/arrow_utilities.hpp index 1cee3071fcb..1b79fbf9eda 100644 --- a/cpp/src/interop/arrow_utilities.hpp +++ b/cpp/src/interop/arrow_utilities.hpp @@ -17,11 +17,10 @@ #pragma once #include +#include #include #include -#include -#include #include diff --git a/cpp/src/interop/decimal_conversion_utilities.cuh b/cpp/src/interop/decimal_conversion_utilities.cuh index 41263147404..6b62eb0fee4 100644 --- a/cpp/src/interop/decimal_conversion_utilities.cuh +++ b/cpp/src/interop/decimal_conversion_utilities.cuh @@ -18,9 +18,9 @@ #include #include +#include #include -#include #include diff --git a/cpp/src/interop/dlpack.cpp b/cpp/src/interop/dlpack.cpp index 78ddd7f5ad5..ba5b11b90d8 100644 --- a/cpp/src/interop/dlpack.cpp +++ b/cpp/src/interop/dlpack.cpp @@ -20,12 +20,12 @@ #include #include #include +#include #include #include #include #include -#include #include diff --git a/cpp/src/interop/from_arrow_device.cu b/cpp/src/interop/from_arrow_device.cu index 440df571de0..057e563c86e 100644 --- a/cpp/src/interop/from_arrow_device.cu +++ b/cpp/src/interop/from_arrow_device.cu @@ -28,13 +28,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/interop/from_arrow_host.cu b/cpp/src/interop/from_arrow_host.cu index efde8f2a463..2e9504a6726 100644 --- a/cpp/src/interop/from_arrow_host.cu +++ b/cpp/src/interop/from_arrow_host.cu @@ -31,13 +31,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/interop/from_arrow_stream.cu b/cpp/src/interop/from_arrow_stream.cu index 578105aa90a..deff62be576 100644 --- a/cpp/src/interop/from_arrow_stream.cu +++ b/cpp/src/interop/from_arrow_stream.cu @@ -24,7 +24,6 @@ #include #include -#include #include #include diff --git a/cpp/src/interop/to_arrow_device.cu b/cpp/src/interop/to_arrow_device.cu index a5f3f9d87f5..a2874b46b06 100644 --- a/cpp/src/interop/to_arrow_device.cu +++ b/cpp/src/interop/to_arrow_device.cu @@ -30,14 +30,13 @@ #include #include #include +#include #include #include #include #include #include -#include -#include #include #include diff --git a/cpp/src/interop/to_arrow_host.cu b/cpp/src/interop/to_arrow_host.cu index 26f7c7e6e53..79fb7550044 100644 --- a/cpp/src/interop/to_arrow_host.cu +++ b/cpp/src/interop/to_arrow_host.cu @@ -30,14 +30,13 @@ #include #include #include +#include #include #include #include #include #include -#include -#include #include #include diff --git a/cpp/src/io/avro/reader_impl.cu b/cpp/src/io/avro/reader_impl.cu index 69a0e982a5b..f0a92f7554d 100644 --- a/cpp/src/io/avro/reader_impl.cu +++ b/cpp/src/io/avro/reader_impl.cu @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include #include #include @@ -448,7 +448,7 @@ std::vector decode_data(metadata& meta, } auto block_list = cudf::detail::make_device_uvector_async( - meta.block_list, stream, rmm::mr::get_current_device_resource()); + meta.block_list, stream, cudf::get_current_device_resource_ref()); schema_desc.host_to_device_async(stream); @@ -578,9 +578,9 @@ table_with_metadata read_avro(std::unique_ptr&& source, } d_global_dict = cudf::detail::make_device_uvector_async( - h_global_dict, stream, rmm::mr::get_current_device_resource()); + h_global_dict, stream, cudf::get_current_device_resource_ref()); d_global_dict_data = cudf::detail::make_device_uvector_async( - h_global_dict_data, stream, rmm::mr::get_current_device_resource()); + h_global_dict_data, stream, cudf::get_current_device_resource_ref()); stream.synchronize(); } diff --git a/cpp/src/io/comp/uncomp.cpp b/cpp/src/io/comp/uncomp.cpp index ab516dd585d..602ff1734b6 100644 --- a/cpp/src/io/comp/uncomp.cpp +++ b/cpp/src/io/comp/uncomp.cpp @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -510,7 +511,7 @@ size_t decompress_zstd(host_span src, { // Init device span of spans (source) auto const d_src = - cudf::detail::make_device_uvector_async(src, stream, rmm::mr::get_current_device_resource()); + cudf::detail::make_device_uvector_async(src, stream, cudf::get_current_device_resource_ref()); auto hd_srcs = cudf::detail::hostdevice_vector>(1, stream); hd_srcs[0] = d_src; hd_srcs.host_to_device_async(stream); diff --git a/cpp/src/io/csv/csv_gpu.cu b/cpp/src/io/csv/csv_gpu.cu index 5a0c6decfda..273e82edf8b 100644 --- a/cpp/src/io/csv/csv_gpu.cu +++ b/cpp/src/io/csv/csv_gpu.cu @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -807,7 +808,7 @@ cudf::detail::host_vector detect_column_types( int const grid_size = (row_starts.size() + block_size - 1) / block_size; auto d_stats = detail::make_zeroed_device_uvector_async( - num_active_columns, stream, rmm::mr::get_current_device_resource()); + num_active_columns, stream, cudf::get_current_device_resource_ref()); data_type_detection<<>>( options, data, column_flags, row_starts, d_stats); diff --git a/cpp/src/io/csv/durations.cu b/cpp/src/io/csv/durations.cu index 918951d5902..eac86b2f199 100644 --- a/cpp/src/io/csv/durations.cu +++ b/cpp/src/io/csv/durations.cu @@ -22,9 +22,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/io/csv/durations.hpp b/cpp/src/io/csv/durations.hpp index f671f435eeb..62f31dcd09c 100644 --- a/cpp/src/io/csv/durations.hpp +++ b/cpp/src/io/csv/durations.hpp @@ -17,10 +17,9 @@ #pragma once #include +#include #include -#include -#include #include diff --git a/cpp/src/io/csv/reader_impl.cu b/cpp/src/io/csv/reader_impl.cu index e27b06682bb..ebca334a715 100644 --- a/cpp/src/io/csv/reader_impl.cu +++ b/cpp/src/io/csv/reader_impl.cu @@ -37,10 +37,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -532,7 +532,7 @@ void infer_column_types(parse_options const& parse_opts, auto const column_stats = cudf::io::csv::gpu::detect_column_types( parse_opts.view(), data, - make_device_uvector_async(column_flags, stream, rmm::mr::get_current_device_resource()), + make_device_uvector_async(column_flags, stream, cudf::get_current_device_resource_ref()), row_offsets, num_inferred_columns, stream); @@ -601,16 +601,16 @@ std::vector decode_data(parse_options const& parse_opts, } auto d_valid_counts = cudf::detail::make_zeroed_device_uvector_async( - num_active_columns, stream, rmm::mr::get_current_device_resource()); + num_active_columns, stream, cudf::get_current_device_resource_ref()); cudf::io::csv::gpu::decode_row_column_data( parse_opts.view(), data, - make_device_uvector_async(column_flags, stream, rmm::mr::get_current_device_resource()), + make_device_uvector_async(column_flags, stream, cudf::get_current_device_resource_ref()), row_offsets, - make_device_uvector_async(column_types, stream, rmm::mr::get_current_device_resource()), - make_device_uvector_async(h_data, stream, rmm::mr::get_current_device_resource()), - make_device_uvector_async(h_valid, stream, rmm::mr::get_current_device_resource()), + make_device_uvector_async(column_types, stream, cudf::get_current_device_resource_ref()), + make_device_uvector_async(h_data, stream, cudf::get_current_device_resource_ref()), + make_device_uvector_async(h_valid, stream, cudf::get_current_device_resource_ref()), d_valid_counts, stream); diff --git a/cpp/src/io/csv/writer_impl.cu b/cpp/src/io/csv/writer_impl.cu index 00a6dcb2286..b84446b5f3e 100644 --- a/cpp/src/io/csv/writer_impl.cu +++ b/cpp/src/io/csv/writer_impl.cu @@ -38,11 +38,10 @@ #include #include #include +#include #include #include -#include -#include #include #include @@ -436,7 +435,7 @@ void write_csv(data_sink* out_sink, // (even for tables with no rows) // write_chunked_begin( - out_sink, table, user_column_names, options, stream, rmm::mr::get_current_device_resource()); + out_sink, table, user_column_names, options, stream, cudf::get_current_device_resource_ref()); if (table.num_rows() > 0) { // no need to check same-size columns constraint; auto-enforced by table_view @@ -470,7 +469,7 @@ void write_csv(data_sink* out_sink, // convert each chunk to CSV: // - column_to_strings_fn converter{options, stream, rmm::mr::get_current_device_resource()}; + column_to_strings_fn converter{options, stream, cudf::get_current_device_resource_ref()}; for (auto&& sub_view : vector_views) { // Skip if the table has no rows if (sub_view.num_rows() == 0) continue; @@ -505,13 +504,13 @@ void write_csv(data_sink* out_sink, options_narep, strings::separator_on_nulls::YES, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return cudf::strings::detail::replace_nulls( - str_table_view.column(0), options_narep, stream, rmm::mr::get_current_device_resource()); + str_table_view.column(0), options_narep, stream, cudf::get_current_device_resource_ref()); }(); write_chunked( - out_sink, str_concat_col->view(), options, stream, rmm::mr::get_current_device_resource()); + out_sink, str_concat_col->view(), options, stream, cudf::get_current_device_resource_ref()); } } } diff --git a/cpp/src/io/functions.cpp b/cpp/src/io/functions.cpp index 62c3c5cd245..0ca54da5aaf 100644 --- a/cpp/src/io/functions.cpp +++ b/cpp/src/io/functions.cpp @@ -35,8 +35,7 @@ #include #include #include - -#include +#include #include diff --git a/cpp/src/io/json/json_column.cu b/cpp/src/io/json/json_column.cu index 8d6890045be..8890c786287 100644 --- a/cpp/src/io/json/json_column.cu +++ b/cpp/src/io/json/json_column.cu @@ -26,12 +26,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -369,7 +369,7 @@ std::vector copy_strings_to_host_sync( 0, options_view, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto to_host = [stream](auto const& col) { if (col.is_empty()) return std::vector{}; auto const scv = cudf::strings_column_view(col); @@ -825,9 +825,9 @@ void make_device_json_column(device_span input, } auto d_ignore_vals = cudf::detail::make_device_uvector_async( - ignore_vals, stream, rmm::mr::get_current_device_resource()); + ignore_vals, stream, cudf::get_current_device_resource_ref()); auto d_columns_data = cudf::detail::make_device_uvector_async( - columns_data, stream, rmm::mr::get_current_device_resource()); + columns_data, stream, cudf::get_current_device_resource_ref()); // 3. scatter string offsets to respective columns, set validity bits thrust::for_each_n( @@ -1118,13 +1118,13 @@ table_with_metadata device_parse_nested_json(device_span d_input, auto gpu_tree = [&]() { // Parse the JSON and get the token stream const auto [tokens_gpu, token_indices_gpu] = - get_token_stream(d_input, options, stream, rmm::mr::get_current_device_resource()); + get_token_stream(d_input, options, stream, cudf::get_current_device_resource_ref()); // gpu tree generation return get_tree_representation(tokens_gpu, token_indices_gpu, options.is_enabled_mixed_types_as_string(), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); }(); // IILE used to free memory of token data. #ifdef NJP_DEBUG_PRINT auto h_input = cudf::detail::make_host_vector_async(d_input, stream); @@ -1150,7 +1150,7 @@ table_with_metadata device_parse_nested_json(device_span d_input, is_array_of_arrays, options.is_enabled_lines(), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); device_json_column root_column(stream, mr); root_column.type = json_col_t::ListColumn; diff --git a/cpp/src/io/json/json_normalization.cu b/cpp/src/io/json/json_normalization.cu index cb8b4e97ebb..7899ea7bac4 100644 --- a/cpp/src/io/json/json_normalization.cu +++ b/cpp/src/io/json/json_normalization.cu @@ -18,12 +18,12 @@ #include #include +#include #include #include #include #include -#include #include diff --git a/cpp/src/io/json/json_tree.cu b/cpp/src/io/json/json_tree.cu index ee6bc0b9f4b..4d0dc010c57 100644 --- a/cpp/src/io/json/json_tree.cu +++ b/cpp/src/io/json/json_tree.cu @@ -26,12 +26,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/io/json/nested_json.hpp b/cpp/src/io/json/nested_json.hpp index 20c143f66c7..b06458e1a8e 100644 --- a/cpp/src/io/json/nested_json.hpp +++ b/cpp/src/io/json/nested_json.hpp @@ -22,8 +22,7 @@ #include #include #include - -#include +#include #include #include diff --git a/cpp/src/io/json/nested_json_gpu.cu b/cpp/src/io/json/nested_json_gpu.cu index 1e484d74679..d76e5447c30 100644 --- a/cpp/src/io/json/nested_json_gpu.cu +++ b/cpp/src/io/json/nested_json_gpu.cu @@ -31,12 +31,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -1517,7 +1517,7 @@ std::pair, rmm::device_uvector> pr fst::detail::make_translation_functor(token_filter::TransduceToken{}), stream); - auto const mr = rmm::mr::get_current_device_resource(); + auto const mr = cudf::get_current_device_resource_ref(); rmm::device_scalar d_num_selected_tokens(stream, mr); rmm::device_uvector filtered_tokens_out{tokens.size(), stream, mr}; rmm::device_uvector filtered_token_indices_out{tokens.size(), stream, mr}; @@ -2125,10 +2125,10 @@ std::pair, std::vector> json_column_to // Move string_offsets and string_lengths to GPU rmm::device_uvector d_string_offsets = cudf::detail::make_device_uvector_async( - json_col.string_offsets, stream, rmm::mr::get_current_device_resource()); + json_col.string_offsets, stream, cudf::get_current_device_resource_ref()); rmm::device_uvector d_string_lengths = cudf::detail::make_device_uvector_async( - json_col.string_lengths, stream, rmm::mr::get_current_device_resource()); + json_col.string_lengths, stream, cudf::get_current_device_resource_ref()); // Prepare iterator that returns (string_offset, string_length)-tuples auto offset_length_it = diff --git a/cpp/src/io/json/read_json.cu b/cpp/src/io/json/read_json.cu index 98e8e8d3c7e..bd82b040359 100644 --- a/cpp/src/io/json/read_json.cu +++ b/cpp/src/io/json/read_json.cu @@ -25,11 +25,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -229,13 +229,13 @@ table_with_metadata read_batch(host_span> sources, // If input JSON buffer has single quotes and option to normalize single quotes is enabled, // invoke pre-processing FST if (reader_opts.is_enabled_normalize_single_quotes()) { - normalize_single_quotes(bufview, stream, rmm::mr::get_current_device_resource()); + normalize_single_quotes(bufview, stream, cudf::get_current_device_resource_ref()); } // If input JSON buffer has unquoted spaces and tabs and option to normalize whitespaces is // enabled, invoke pre-processing FST if (reader_opts.is_enabled_normalize_whitespace()) { - normalize_whitespace(bufview, stream, rmm::mr::get_current_device_resource()); + normalize_whitespace(bufview, stream, cudf::get_current_device_resource_ref()); } auto buffer = @@ -304,7 +304,7 @@ device_span ingest_raw_input(device_span buffer, "Currently only single-character delimiters are supported"); auto const delimiter_source = thrust::make_constant_iterator('\n'); auto const d_delimiter_map = cudf::detail::make_device_uvector_async( - delimiter_map, stream, rmm::mr::get_current_device_resource()); + delimiter_map, stream, cudf::get_current_device_resource_ref()); thrust::scatter(rmm::exec_policy_nosync(stream), delimiter_source, delimiter_source + d_delimiter_map.size(), @@ -421,7 +421,7 @@ table_with_metadata read_json(host_span> sources, batched_reader_opts.set_byte_range_offset(batch_offsets[i]); batched_reader_opts.set_byte_range_size(batch_offsets[i + 1] - batch_offsets[i]); partial_tables.emplace_back( - read_batch(sources, batched_reader_opts, stream, rmm::mr::get_current_device_resource())); + read_batch(sources, batched_reader_opts, stream, cudf::get_current_device_resource_ref())); } auto expects_schema_equality = diff --git a/cpp/src/io/json/read_json.hpp b/cpp/src/io/json/read_json.hpp index 7e3a920f00d..982190eecb5 100644 --- a/cpp/src/io/json/read_json.hpp +++ b/cpp/src/io/json/read_json.hpp @@ -20,11 +20,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/io/json/write_json.cu b/cpp/src/io/json/write_json.cu index 60bb2366e87..dc7199d7ab1 100644 --- a/cpp/src/io/json/write_json.cu +++ b/cpp/src/io/json/write_json.cu @@ -42,12 +42,11 @@ #include #include #include +#include #include #include #include -#include -#include #include #include @@ -437,7 +436,7 @@ std::unique_ptr join_list_of_strings(lists_column_view const& lists_stri // scatter string and separator auto labels = cudf::lists::detail::generate_labels( - lists_strings, num_strings, stream, rmm::mr::get_current_device_resource()); + lists_strings, num_strings, stream, cudf::get_current_device_resource_ref()); auto d_strings_children = cudf::column_device_view::create(strings_children, stream); thrust::for_each(rmm::exec_policy(stream), thrust::make_counting_iterator(0), @@ -645,13 +644,13 @@ struct column_to_strings_fn { } }; auto new_offsets = cudf::lists::detail::get_normalized_offsets( - lists_column_view(column), stream_, rmm::mr::get_current_device_resource()); + lists_column_view(column), stream_, cudf::get_current_device_resource_ref()); auto const list_child_string = make_lists_column( column.size(), std::move(new_offsets), child_string_with_null(), column.null_count(), - cudf::detail::copy_bitmask(column, stream_, rmm::mr::get_current_device_resource()), + cudf::detail::copy_bitmask(column, stream_, cudf::get_current_device_resource_ref()), stream_); return join_list_of_strings(lists_column_view(*list_child_string), list_row_begin_wrap.value(stream_), @@ -736,7 +735,7 @@ struct column_to_strings_fn { narep, options_.is_enabled_include_nulls(), stream_, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); } private: @@ -765,17 +764,18 @@ std::unique_ptr make_strings_column_from_host(host_span offsets(host_strings.size() + 1, 0); std::transform_inclusive_scan(host_strings.begin(), host_strings.end(), offsets.begin() + 1, std::plus{}, [](auto& str) { return str.size(); }); - auto d_offsets = std::make_unique( - cudf::detail::make_device_uvector_sync(offsets, stream, rmm::mr::get_current_device_resource()), - rmm::device_buffer{}, - 0); + auto d_offsets = + std::make_unique(cudf::detail::make_device_uvector_sync( + offsets, stream, cudf::get_current_device_resource_ref()), + rmm::device_buffer{}, + 0); return cudf::make_strings_column( host_strings.size(), std::move(d_offsets), d_chars.release(), 0, {}); } @@ -798,7 +798,7 @@ std::unique_ptr make_column_names_column(host_span #include #include +#include #include -#include #include diff --git a/cpp/src/io/orc/reader_impl_decode.cu b/cpp/src/io/orc/reader_impl_decode.cu index e3b9a048be8..d628e936cb1 100644 --- a/cpp/src/io/orc/reader_impl_decode.cu +++ b/cpp/src/io/orc/reader_impl_decode.cu @@ -28,13 +28,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include @@ -506,7 +506,7 @@ void scan_null_counts(cudf::detail::hostdevice_2dvector const& } } auto const d_prefix_sums_to_update = cudf::detail::make_device_uvector_async( - prefix_sums_to_update, stream, rmm::mr::get_current_device_resource()); + prefix_sums_to_update, stream, cudf::get_current_device_resource_ref()); thrust::for_each( rmm::exec_policy_nosync(stream), @@ -683,7 +683,7 @@ std::vector find_table_splits(table_view const& input, segment_length = std::min(segment_length, input.num_rows()); auto const d_segmented_sizes = cudf::detail::segmented_row_bit_count( - input, segment_length, stream, rmm::mr::get_current_device_resource()); + input, segment_length, stream, cudf::get_current_device_resource_ref()); auto segmented_sizes = cudf::detail::hostdevice_vector(d_segmented_sizes->size(), stream); @@ -777,7 +777,7 @@ void reader_impl::decompress_and_decode_stripes(read_mode mode) [](auto const& sum, auto const& cols_level) { return sum + cols_level.size(); }); return cudf::detail::make_zeroed_device_uvector_async( - num_total_cols * stripe_count, _stream, rmm::mr::get_current_device_resource()); + num_total_cols * stripe_count, _stream, cudf::get_current_device_resource_ref()); }(); std::size_t num_processed_lvl_columns = 0; std::size_t num_processed_prev_lvl_columns = 0; diff --git a/cpp/src/io/orc/reader_impl_helpers.cpp b/cpp/src/io/orc/reader_impl_helpers.cpp index c943ae17d97..4c1079cffe8 100644 --- a/cpp/src/io/orc/reader_impl_helpers.cpp +++ b/cpp/src/io/orc/reader_impl_helpers.cpp @@ -16,7 +16,7 @@ #include "reader_impl_helpers.hpp" -#include +#include namespace cudf::io::orc::detail { diff --git a/cpp/src/io/orc/reader_impl_helpers.hpp b/cpp/src/io/orc/reader_impl_helpers.hpp index a563fb19e15..5528b2ee763 100644 --- a/cpp/src/io/orc/reader_impl_helpers.hpp +++ b/cpp/src/io/orc/reader_impl_helpers.hpp @@ -21,9 +21,9 @@ #include "io/utilities/column_buffer.hpp" #include +#include #include -#include #include #include diff --git a/cpp/src/io/orc/stripe_enc.cu b/cpp/src/io/orc/stripe_enc.cu index 80f32512b98..5c70e35fd2e 100644 --- a/cpp/src/io/orc/stripe_enc.cu +++ b/cpp/src/io/orc/stripe_enc.cu @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -1425,7 +1426,7 @@ void decimal_sizes_to_offsets(device_2dspan rg_bounds, // Copy the vector of views to the device so that we can pass it to the kernel auto d_sizes = cudf::detail::make_device_uvector_async( - h_sizes, stream, rmm::mr::get_current_device_resource()); + h_sizes, stream, cudf::get_current_device_resource_ref()); constexpr int block_size = 256; dim3 const grid_size{static_cast(elem_sizes.size()), // num decimal columns diff --git a/cpp/src/io/orc/writer_impl.cu b/cpp/src/io/orc/writer_impl.cu index ebdf9f3f249..60a64fb0ee6 100644 --- a/cpp/src/io/orc/writer_impl.cu +++ b/cpp/src/io/orc/writer_impl.cu @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -728,7 +729,7 @@ std::vector> calculate_aligned_rowgroup_bounds( cudaMemcpyDefault, stream.value())); auto const d_stripes = cudf::detail::make_device_uvector_async( - segmentation.stripes, stream, rmm::mr::get_current_device_resource()); + segmentation.stripes, stream, cudf::get_current_device_resource_ref()); // One thread per column, per stripe thrust::for_each_n( @@ -1354,7 +1355,7 @@ encoded_footer_statistics finish_statistic_blobs(Footer const& footer, } // Copy to device auto const d_stat_chunks = cudf::detail::make_device_uvector_async( - h_stat_chunks, stream, rmm::mr::get_current_device_resource()); + h_stat_chunks, stream, cudf::get_current_device_resource_ref()); stats_merge.host_to_device_async(stream); // Encode and return @@ -1738,7 +1739,7 @@ pushdown_null_masks init_pushdown_null_masks(orc_table_view& orc_table, // Attach null masks to device column views (async) auto const d_mask_ptrs = cudf::detail::make_device_uvector_async( - mask_ptrs, stream, rmm::mr::get_current_device_resource()); + mask_ptrs, stream, cudf::get_current_device_resource_ref()); thrust::for_each_n( rmm::exec_policy(stream), thrust::make_counting_iterator(0ul), @@ -1828,7 +1829,7 @@ orc_table_view make_orc_table_view(table_view const& table, return orc_column.orc_kind(); }); auto const d_type_kinds = cudf::detail::make_device_uvector_async( - type_kinds, stream, rmm::mr::get_current_device_resource()); + type_kinds, stream, cudf::get_current_device_resource_ref()); rmm::device_uvector d_orc_columns(orc_columns.size(), stream); using stack_value_type = thrust::pair>; @@ -1879,7 +1880,7 @@ orc_table_view make_orc_table_view(table_view const& table, std::move(d_orc_columns), str_col_indexes, cudf::detail::make_device_uvector_sync( - str_col_indexes, stream, rmm::mr::get_current_device_resource())}; + str_col_indexes, stream, cudf::get_current_device_resource_ref())}; } hostdevice_2dvector calculate_rowgroup_bounds(orc_table_view const& orc_table, @@ -2239,7 +2240,7 @@ stripe_dictionaries build_dictionaries(orc_table_view& orc_table, // Create the inverse permutation - i.e. the mapping from the original order to the sorted auto order_copy = cudf::detail::make_device_uvector_async( - sd.data_order, current_stream, rmm::mr::get_current_device_resource()); + sd.data_order, current_stream, cudf::get_current_device_resource_ref()); thrust::scatter(rmm::exec_policy_nosync(current_stream), thrust::counting_iterator(0), thrust::counting_iterator(sd.data_order.size()), diff --git a/cpp/src/io/parquet/predicate_pushdown.cpp b/cpp/src/io/parquet/predicate_pushdown.cpp index c8b8b7a1193..b90ca36c8c7 100644 --- a/cpp/src/io/parquet/predicate_pushdown.cpp +++ b/cpp/src/io/parquet/predicate_pushdown.cpp @@ -25,12 +25,10 @@ #include #include #include +#include #include #include -#include -#include - #include #include @@ -399,7 +397,7 @@ std::optional>> aggregate_reader_metadata::fi std::reference_wrapper filter, rmm::cuda_stream_view stream) const { - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); // Create row group indices. std::vector> filtered_row_group_indices; std::vector> all_row_group_indices; diff --git a/cpp/src/io/parquet/reader.cpp b/cpp/src/io/parquet/reader.cpp index 65dafb568c0..dd354b905f3 100644 --- a/cpp/src/io/parquet/reader.cpp +++ b/cpp/src/io/parquet/reader.cpp @@ -16,7 +16,7 @@ #include "reader_impl.hpp" -#include +#include namespace cudf::io::parquet::detail { diff --git a/cpp/src/io/parquet/reader_impl.cpp b/cpp/src/io/parquet/reader_impl.cpp index 9950e2f7d7d..7d817bde7af 100644 --- a/cpp/src/io/parquet/reader_impl.cpp +++ b/cpp/src/io/parquet/reader_impl.cpp @@ -23,8 +23,7 @@ #include #include #include - -#include +#include #include #include @@ -706,7 +705,7 @@ table_with_metadata reader::impl::finalize_output(read_mode mode, auto predicate = cudf::detail::compute_column(*read_table, _expr_conv.get_converted_expr().value().get(), _stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_EXPECTS(predicate->view().type().id() == type_id::BOOL8, "Predicate filter should return a boolean"); // Exclude columns present in filter only in output diff --git a/cpp/src/io/parquet/reader_impl.hpp b/cpp/src/io/parquet/reader_impl.hpp index 5e3cc4301f9..2d46da14bec 100644 --- a/cpp/src/io/parquet/reader_impl.hpp +++ b/cpp/src/io/parquet/reader_impl.hpp @@ -28,11 +28,10 @@ #include #include #include +#include #include #include -#include -#include #include #include @@ -369,7 +368,7 @@ class reader::impl { size_t chunk_num_rows); rmm::cuda_stream_view _stream; - rmm::device_async_resource_ref _mr{rmm::mr::get_current_device_resource()}; + rmm::device_async_resource_ref _mr{cudf::get_current_device_resource_ref()}; // Reader configs. struct { diff --git a/cpp/src/io/parquet/reader_impl_chunking.cu b/cpp/src/io/parquet/reader_impl_chunking.cu index 00d62c45962..84f0dab0d8b 100644 --- a/cpp/src/io/parquet/reader_impl_chunking.cu +++ b/cpp/src/io/parquet/reader_impl_chunking.cu @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -441,7 +442,7 @@ adjust_cumulative_sizes(device_span c_info, { // sort by row count rmm::device_uvector c_info_sorted = - make_device_uvector_async(c_info, stream, rmm::mr::get_current_device_resource()); + make_device_uvector_async(c_info, stream, cudf::get_current_device_resource_ref()); thrust::sort( rmm::exec_policy_nosync(stream), c_info_sorted.begin(), c_info_sorted.end(), row_count_less{}); @@ -846,9 +847,9 @@ std::vector compute_page_splits_by_row(device_span compute_page_splits_by_row(device_span chunk // add to the cumulative_page_info data rmm::device_uvector d_temp_cost = cudf::detail::make_device_uvector_async( - temp_cost, stream, rmm::mr::get_current_device_resource()); + temp_cost, stream, cudf::get_current_device_resource_ref()); auto iter = thrust::make_counting_iterator(size_t{0}); thrust::for_each(rmm::exec_policy_nosync(stream), iter, @@ -1346,7 +1347,7 @@ void reader::impl::setup_next_subpass(read_mode mode) [&]() -> std::tuple, size_t, size_t> { if (!pass.has_compressed_data || _input_pass_read_limit == 0) { rmm::device_uvector page_indices( - num_columns, _stream, rmm::mr::get_current_device_resource()); + num_columns, _stream, cudf::get_current_device_resource_ref()); auto iter = thrust::make_counting_iterator(0); thrust::transform(rmm::exec_policy_nosync(_stream), iter, diff --git a/cpp/src/io/parquet/reader_impl_preprocess.cu b/cpp/src/io/parquet/reader_impl_preprocess.cu index 557b1a45c1f..52918f5bc80 100644 --- a/cpp/src/io/parquet/reader_impl_preprocess.cu +++ b/cpp/src/io/parquet/reader_impl_preprocess.cu @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -392,7 +393,7 @@ void fill_in_page_info(host_span chunks, } auto d_page_indexes = cudf::detail::make_device_uvector_async( - page_indexes, stream, rmm::mr::get_current_device_resource()); + page_indexes, stream, cudf::get_current_device_resource_ref()); auto iter = thrust::make_counting_iterator(0); thrust::for_each( @@ -754,7 +755,7 @@ void reader::impl::build_string_dict_indices() // allocate and distribute pointers pass.str_dict_index = cudf::detail::make_zeroed_device_uvector_async( - total_str_dict_indexes, _stream, rmm::mr::get_current_device_resource()); + total_str_dict_indexes, _stream, cudf::get_current_device_resource_ref()); auto iter = thrust::make_counting_iterator(0); thrust::for_each( @@ -907,7 +908,7 @@ void reader::impl::allocate_level_decode_space() size_t const per_page_decode_buf_size = LEVEL_DECODE_BUF_SIZE * 2 * pass.level_type_size; auto const decode_buf_size = per_page_decode_buf_size * pages.size(); subpass.level_decode_data = - rmm::device_buffer(decode_buf_size, _stream, rmm::mr::get_current_device_resource()); + rmm::device_buffer(decode_buf_size, _stream, cudf::get_current_device_resource_ref()); // distribute the buffers uint8_t* buf = static_cast(subpass.level_decode_data.data()); @@ -1551,7 +1552,7 @@ void reader::impl::allocate_columns(read_mode mode, size_t skip_rows, size_t num .nesting_depth; auto const d_cols_info = cudf::detail::make_device_uvector_async( - h_cols_info, _stream, rmm::mr::get_current_device_resource()); + h_cols_info, _stream, cudf::get_current_device_resource_ref()); auto const num_keys = _input_columns.size() * max_depth * subpass.pages.size(); // size iterator. indexes pages by sorted order diff --git a/cpp/src/io/parquet/writer_impl.cu b/cpp/src/io/parquet/writer_impl.cu index 46c3151c731..81fd4ab9f82 100644 --- a/cpp/src/io/parquet/writer_impl.cu +++ b/cpp/src/io/parquet/writer_impl.cu @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -1048,7 +1049,7 @@ parquet_column_view::parquet_column_view(schema_tree_node const& schema_node, // TODO(cp): Explore doing this for all columns in a single go outside this ctor. Maybe using // hostdevice_vector. Currently this involves a cudaMemcpyAsync for each column. _d_nullability = cudf::detail::make_device_uvector_async( - _nullability, stream, rmm::mr::get_current_device_resource()); + _nullability, stream, cudf::get_current_device_resource_ref()); _is_list = (_max_rep_level > 0); @@ -1120,7 +1121,7 @@ void init_row_group_fragments(cudf::detail::hostdevice_2dvector& f rmm::cuda_stream_view stream) { auto d_partitions = cudf::detail::make_device_uvector_async( - partitions, stream, rmm::mr::get_current_device_resource()); + partitions, stream, cudf::get_current_device_resource_ref()); InitRowGroupFragments(frag, col_desc, d_partitions, part_frag_offset, fragment_size, stream); frag.device_to_host_sync(stream); } @@ -1140,7 +1141,7 @@ void calculate_page_fragments(device_span frag, rmm::cuda_stream_view stream) { auto d_frag_sz = cudf::detail::make_device_uvector_async( - frag_sizes, stream, rmm::mr::get_current_device_resource()); + frag_sizes, stream, cudf::get_current_device_resource_ref()); CalculatePageFragments(frag, d_frag_sz, stream); } @@ -1649,7 +1650,7 @@ std::vector convert_decimal_columns_and_metadata( case type_id::DECIMAL32: // Convert data to decimal128 type d128_buffers.emplace_back(cudf::detail::convert_decimals_to_decimal128( - column, stream, rmm::mr::get_current_device_resource())); + column, stream, cudf::get_current_device_resource_ref())); // Update metadata metadata.set_decimal_precision(MAX_DECIMAL32_PRECISION); metadata.set_type_length(size_of(data_type{type_id::DECIMAL128, column.type().scale()})); @@ -1664,7 +1665,7 @@ std::vector convert_decimal_columns_and_metadata( case type_id::DECIMAL64: // Convert data to decimal128 type d128_buffers.emplace_back(cudf::detail::convert_decimals_to_decimal128( - column, stream, rmm::mr::get_current_device_resource())); + column, stream, cudf::get_current_device_resource_ref())); // Update metadata metadata.set_decimal_precision(MAX_DECIMAL64_PRECISION); metadata.set_type_length(size_of(data_type{type_id::DECIMAL128, column.type().scale()})); @@ -1869,7 +1870,7 @@ auto convert_table_to_parquet_data(table_input_metadata& table_meta, part_frag_offset.push_back(part_frag_offset.back() + num_frag_in_part.back()); auto d_part_frag_offset = cudf::detail::make_device_uvector_async( - part_frag_offset, stream, rmm::mr::get_current_device_resource()); + part_frag_offset, stream, cudf::get_current_device_resource_ref()); cudf::detail::hostdevice_2dvector row_group_fragments( num_columns, num_fragments, stream); diff --git a/cpp/src/io/text/multibyte_split.cu b/cpp/src/io/text/multibyte_split.cu index e3435a24b18..028f922bec3 100644 --- a/cpp/src/io/text/multibyte_split.cu +++ b/cpp/src/io/text/multibyte_split.cu @@ -33,13 +33,12 @@ #include #include #include +#include #include #include #include #include -#include -#include #include #include @@ -345,9 +344,9 @@ std::unique_ptr multibyte_split(cudf::io::text::data_chunk_source auto const concurrency = 2; auto num_tile_states = std::max(32, TILES_PER_CHUNK * concurrency + 32); auto tile_multistates = - scan_tile_state(num_tile_states, stream, rmm::mr::get_current_device_resource()); + scan_tile_state(num_tile_states, stream, cudf::get_current_device_resource_ref()); auto tile_offsets = scan_tile_state( - num_tile_states, stream, rmm::mr::get_current_device_resource()); + num_tile_states, stream, cudf::get_current_device_resource_ref()); multibyte_split_init_kernel<< #include #include - -#include -#include +#include #include #include @@ -44,7 +42,7 @@ void gather_column_buffer::allocate_strings_data(bool memset_data, rmm::cuda_str // default rmm memory resource. _strings = std::make_unique>( cudf::detail::make_zeroed_device_uvector_async( - size, stream, rmm::mr::get_current_device_resource())); + size, stream, cudf::get_current_device_resource_ref())); } std::unique_ptr gather_column_buffer::make_string_column_impl(rmm::cuda_stream_view stream) diff --git a/cpp/src/io/utilities/column_buffer.hpp b/cpp/src/io/utilities/column_buffer.hpp index b2290965bb9..e73b2bc88de 100644 --- a/cpp/src/io/utilities/column_buffer.hpp +++ b/cpp/src/io/utilities/column_buffer.hpp @@ -26,13 +26,12 @@ #include #include #include +#include #include #include #include #include -#include -#include #include @@ -167,7 +166,7 @@ class column_buffer_base { rmm::device_buffer _data{}; rmm::device_buffer _null_mask{}; size_type _null_count{0}; - rmm::device_async_resource_ref _mr{rmm::mr::get_current_device_resource()}; + rmm::device_async_resource_ref _mr{cudf::get_current_device_resource_ref()}; public: data_type type{type_id::EMPTY}; diff --git a/cpp/src/io/utilities/data_casting.cu b/cpp/src/io/utilities/data_casting.cu index 73362334e26..f70171eef68 100644 --- a/cpp/src/io/utilities/data_casting.cu +++ b/cpp/src/io/utilities/data_casting.cu @@ -28,11 +28,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/io/utilities/output_builder.cuh b/cpp/src/io/utilities/output_builder.cuh index 3bc5ccf41ef..f7e6de03354 100644 --- a/cpp/src/io/utilities/output_builder.cuh +++ b/cpp/src/io/utilities/output_builder.cuh @@ -16,12 +16,12 @@ #include #include +#include #include #include #include #include -#include #include @@ -207,7 +207,7 @@ class output_builder { output_builder(size_type max_write_size, size_type max_growth, rmm::cuda_stream_view stream, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) : _max_write_size{max_write_size}, _max_growth{max_growth} { CUDF_EXPECTS(max_write_size > 0, "Internal error"); diff --git a/cpp/src/io/utilities/string_parsing.hpp b/cpp/src/io/utilities/string_parsing.hpp index 0d9e7e40e4e..1d6d5a0a570 100644 --- a/cpp/src/io/utilities/string_parsing.hpp +++ b/cpp/src/io/utilities/string_parsing.hpp @@ -19,10 +19,10 @@ #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/io/utilities/trie.cu b/cpp/src/io/utilities/trie.cu index 3be1a8332ca..504e72147e5 100644 --- a/cpp/src/io/utilities/trie.cu +++ b/cpp/src/io/utilities/trie.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023, NVIDIA CORPORATION. + * Copyright (c) 2021-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. @@ -22,6 +22,7 @@ #include "trie.cuh" #include +#include #include #include @@ -104,7 +105,7 @@ rmm::device_uvector create_serialized_trie(std::vector #include #include +#include #include -#include #include diff --git a/cpp/src/join/conditional_join.hpp b/cpp/src/join/conditional_join.hpp index 06eb83d6ba8..4f6a9484e8c 100644 --- a/cpp/src/join/conditional_join.hpp +++ b/cpp/src/join/conditional_join.hpp @@ -20,10 +20,9 @@ #include #include #include +#include #include -#include -#include #include diff --git a/cpp/src/join/cross_join.cu b/cpp/src/join/cross_join.cu index a2ee3a7796b..eeb49736bac 100644 --- a/cpp/src/join/cross_join.cu +++ b/cpp/src/join/cross_join.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace detail { diff --git a/cpp/src/join/distinct_hash_join.cu b/cpp/src/join/distinct_hash_join.cu index 3d95b0c5a5c..c7294152982 100644 --- a/cpp/src/join/distinct_hash_join.cu +++ b/cpp/src/join/distinct_hash_join.cu @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -139,7 +139,8 @@ distinct_hash_join::distinct_hash_join(cudf::table_view const& build, } else { auto stencil = thrust::counting_iterator{0}; auto const row_bitmask = - cudf::detail::bitmask_and(this->_build, stream, rmm::mr::get_current_device_resource()).first; + cudf::detail::bitmask_and(this->_build, stream, cudf::get_current_device_resource_ref()) + .first; auto const pred = cudf::detail::row_is_valid{reinterpret_cast(row_bitmask.data())}; diff --git a/cpp/src/join/hash_join.cu b/cpp/src/join/hash_join.cu index 5d01482f44a..beeaabfdaab 100644 --- a/cpp/src/join/hash_join.cu +++ b/cpp/src/join/hash_join.cu @@ -22,13 +22,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include @@ -385,7 +385,7 @@ hash_join::hash_join(cudf::table_view const& build, if (_is_empty) { return; } auto const row_bitmask = - cudf::detail::bitmask_and(build, stream, rmm::mr::get_current_device_resource()).first; + cudf::detail::bitmask_and(build, stream, cudf::get_current_device_resource_ref()).first; cudf::detail::build_join_hash_table(_build, _preprocessed_build, _hash_table, diff --git a/cpp/src/join/join.cu b/cpp/src/join/join.cu index bc7f09763ec..0abff27667b 100644 --- a/cpp/src/join/join.cu +++ b/cpp/src/join/join.cu @@ -21,9 +21,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace detail { @@ -41,7 +41,7 @@ inner_join(table_view const& left_input, auto matched = cudf::dictionary::detail::match_dictionaries( {left_input, right_input}, stream, - rmm::mr::get_current_device_resource()); // temporary objects returned + cudf::get_current_device_resource_ref()); // temporary objects returned // now rebuild the table views with the updated ones auto const left = matched.second.front(); @@ -76,7 +76,7 @@ left_join(table_view const& left_input, auto matched = cudf::dictionary::detail::match_dictionaries( {left_input, right_input}, // these should match stream, - rmm::mr::get_current_device_resource()); // temporary objects returned + cudf::get_current_device_resource_ref()); // temporary objects returned // now rebuild the table views with the updated ones table_view const left = matched.second.front(); table_view const right = matched.second.back(); @@ -101,7 +101,7 @@ full_join(table_view const& left_input, auto matched = cudf::dictionary::detail::match_dictionaries( {left_input, right_input}, // these should match stream, - rmm::mr::get_current_device_resource()); // temporary objects returned + cudf::get_current_device_resource_ref()); // temporary objects returned // now rebuild the table views with the updated ones table_view const left = matched.second.front(); table_view const right = matched.second.back(); diff --git a/cpp/src/join/join_common_utils.cuh b/cpp/src/join/join_common_utils.cuh index 3d0f3e4340d..4f75908fe72 100644 --- a/cpp/src/join/join_common_utils.cuh +++ b/cpp/src/join/join_common_utils.cuh @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/join/join_utils.cu b/cpp/src/join/join_utils.cu index 8d916da9f2c..16302657ac2 100644 --- a/cpp/src/join/join_utils.cu +++ b/cpp/src/join/join_utils.cu @@ -16,8 +16,9 @@ #include "join_common_utils.cuh" +#include + #include -#include #include #include diff --git a/cpp/src/join/mixed_join.cu b/cpp/src/join/mixed_join.cu index eb12065c6a9..8ff78dd47f4 100644 --- a/cpp/src/join/mixed_join.cu +++ b/cpp/src/join/mixed_join.cu @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -138,7 +138,7 @@ mixed_join( // places. However, this probably isn't worth adding any time soon since we // won't be able to support AST conditions for those types anyway. auto const row_bitmask = - cudf::detail::bitmask_and(build, stream, rmm::mr::get_current_device_resource()).first; + cudf::detail::bitmask_and(build, stream, cudf::get_current_device_resource_ref()).first; auto const preprocessed_build = experimental::row::equality::preprocessed_table::create(build, stream); build_join_hash_table(build, @@ -404,7 +404,7 @@ compute_mixed_join_output_size(table_view const& left_equality, // places. However, this probably isn't worth adding any time soon since we // won't be able to support AST conditions for those types anyway. auto const row_bitmask = - cudf::detail::bitmask_and(build, stream, rmm::mr::get_current_device_resource()).first; + cudf::detail::bitmask_and(build, stream, cudf::get_current_device_resource_ref()).first; auto const preprocessed_build = experimental::row::equality::preprocessed_table::create(build, stream); build_join_hash_table(build, diff --git a/cpp/src/join/mixed_join_semi.cu b/cpp/src/join/mixed_join_semi.cu index a79aa6673d6..cfb785e242c 100644 --- a/cpp/src/join/mixed_join_semi.cu +++ b/cpp/src/join/mixed_join_semi.cu @@ -30,11 +30,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -208,7 +208,7 @@ std::unique_ptr> mixed_join_semi( } else { thrust::counting_iterator stencil(0); auto const [row_bitmask, _] = - cudf::detail::bitmask_and(build, stream, rmm::mr::get_current_device_resource()); + cudf::detail::bitmask_and(build, stream, cudf::get_current_device_resource_ref()); row_is_valid pred{static_cast(row_bitmask.data())}; // insert valid rows diff --git a/cpp/src/join/mixed_join_size_kernel.hpp b/cpp/src/join/mixed_join_size_kernel.hpp index b09805c14dc..0f570c601d7 100644 --- a/cpp/src/join/mixed_join_size_kernel.hpp +++ b/cpp/src/join/mixed_join_size_kernel.hpp @@ -25,6 +25,9 @@ #include #include +#include +#include + #include #include #include diff --git a/cpp/src/join/semi_join.cu b/cpp/src/join/semi_join.cu index 91d98d5e8d3..f69ded73e8d 100644 --- a/cpp/src/join/semi_join.cu +++ b/cpp/src/join/semi_join.cu @@ -25,11 +25,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -72,7 +72,7 @@ std::unique_ptr> left_semi_anti_join( compare_nulls, nan_equality::ALL_EQUAL, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const left_num_rows = left_keys.num_rows(); auto gather_map = diff --git a/cpp/src/json/json_path.cu b/cpp/src/json/json_path.cu index 1bf4bf3b153..59fdbedf089 100644 --- a/cpp/src/json/json_path.cu +++ b/cpp/src/json/json_path.cu @@ -34,10 +34,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -692,7 +692,7 @@ std::pair>, int> build_co auto const is_empty = h_operators.size() == 1 && h_operators[0].type == path_operator_type::END; return is_empty ? std::pair(cuda::std::nullopt, 0) : std::pair(cuda::std::make_optional(cudf::detail::make_device_uvector_sync( - h_operators, stream, rmm::mr::get_current_device_resource())), + h_operators, stream, cudf::get_current_device_resource_ref())), max_stack_depth); } @@ -999,7 +999,7 @@ std::unique_ptr get_json_object(cudf::strings_column_view const& c // compute output sizes auto sizes = - rmm::device_uvector(col.size(), stream, rmm::mr::get_current_device_resource()); + rmm::device_uvector(col.size(), stream, cudf::get_current_device_resource_ref()); auto d_offsets = cudf::detail::offsetalator_factory::make_input_iterator(col.offsets()); constexpr int block_size = 512; diff --git a/cpp/src/labeling/label_bins.cu b/cpp/src/labeling/label_bins.cu index 7ee1d540831..18a500069ad 100644 --- a/cpp/src/labeling/label_bins.cu +++ b/cpp/src/labeling/label_bins.cu @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -32,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/cpp/src/lists/combine/concatenate_list_elements.cu b/cpp/src/lists/combine/concatenate_list_elements.cu index 58ec053712d..7ae5db3e84b 100644 --- a/cpp/src/lists/combine/concatenate_list_elements.cu +++ b/cpp/src/lists/combine/concatenate_list_elements.cu @@ -27,10 +27,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/lists/combine/concatenate_rows.cu b/cpp/src/lists/combine/concatenate_rows.cu index bc1b48b11cd..790c99c494d 100644 --- a/cpp/src/lists/combine/concatenate_rows.cu +++ b/cpp/src/lists/combine/concatenate_rows.cu @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -219,7 +219,7 @@ std::unique_ptr concatenate_rows(table_view const& input, // concatenate the input table into one column. std::vector cols(input.num_columns()); std::copy(input.begin(), input.end(), cols.begin()); - auto concat = cudf::detail::concatenate(cols, stream, rmm::mr::get_current_device_resource()); + auto concat = cudf::detail::concatenate(cols, stream, cudf::get_current_device_resource_ref()); // whether or not we should be generating a null mask at all auto const build_null_mask = concat->has_nulls(); @@ -251,7 +251,7 @@ std::unique_ptr concatenate_rows(table_view const& input, return row_null_counts[row_index] != num_columns; }), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); } // NULLIFY_OUTPUT_ROW. Output row is nullfied if any input row is null return cudf::detail::valid_if( @@ -264,7 +264,7 @@ std::unique_ptr concatenate_rows(table_view const& input, return row_null_counts[row_index] == 0; }), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); }(); concat->set_null_mask(std::move(null_mask), null_count); } diff --git a/cpp/src/lists/contains.cu b/cpp/src/lists/contains.cu index 11703527d26..9556ef23784 100644 --- a/cpp/src/lists/contains.cu +++ b/cpp/src/lists/contains.cu @@ -28,11 +28,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -316,7 +316,7 @@ std::unique_ptr contains(lists_column_view const& lists, search_key, duplicate_find_option::FIND_FIRST, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return to_contains(std::move(key_indices), stream, mr); } @@ -332,7 +332,7 @@ std::unique_ptr contains(lists_column_view const& lists, search_keys, duplicate_find_option::FIND_FIRST, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return to_contains(std::move(key_indices), stream, mr); } diff --git a/cpp/src/lists/copying/concatenate.cu b/cpp/src/lists/copying/concatenate.cu index 8cd58e7eff2..c8bc4799688 100644 --- a/cpp/src/lists/copying/concatenate.cu +++ b/cpp/src/lists/copying/concatenate.cu @@ -25,10 +25,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/lists/copying/copying.cu b/cpp/src/lists/copying/copying.cu index 162c6140656..b4c0fb12b8e 100644 --- a/cpp/src/lists/copying/copying.cu +++ b/cpp/src/lists/copying/copying.cu @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/lists/copying/gather.cu b/cpp/src/lists/copying/gather.cu index cadeb273a65..0df1801b99b 100644 --- a/cpp/src/lists/copying/gather.cu +++ b/cpp/src/lists/copying/gather.cu @@ -16,9 +16,9 @@ #include #include +#include #include -#include #include #include diff --git a/cpp/src/lists/copying/scatter_helper.cu b/cpp/src/lists/copying/scatter_helper.cu index b754fef24e5..9cbb3c59510 100644 --- a/cpp/src/lists/copying/scatter_helper.cu +++ b/cpp/src/lists/copying/scatter_helper.cu @@ -21,10 +21,9 @@ #include #include #include +#include #include -#include - #include #include #include diff --git a/cpp/src/lists/copying/segmented_gather.cu b/cpp/src/lists/copying/segmented_gather.cu index 90f7994b21d..f6e48f141e1 100644 --- a/cpp/src/lists/copying/segmented_gather.cu +++ b/cpp/src/lists/copying/segmented_gather.cu @@ -22,9 +22,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/lists/count_elements.cu b/cpp/src/lists/count_elements.cu index 19c434d10e1..78f78ff6246 100644 --- a/cpp/src/lists/count_elements.cu +++ b/cpp/src/lists/count_elements.cu @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/lists/dremel.cu b/cpp/src/lists/dremel.cu index 50f40924478..469442d46d4 100644 --- a/cpp/src/lists/dremel.cu +++ b/cpp/src/lists/dremel.cu @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -267,7 +268,7 @@ dremel_data get_encoding(column_view h_col, } auto d_nullability = cudf::detail::make_device_uvector_async( - nullability, stream, rmm::mr::get_current_device_resource()); + nullability, stream, cudf::get_current_device_resource_ref()); rmm::device_uvector rep_level(max_vals_size, stream); rmm::device_uvector def_level(max_vals_size, stream); diff --git a/cpp/src/lists/explode.cu b/cpp/src/lists/explode.cu index 74a0d842aad..00e19e2e2cb 100644 --- a/cpp/src/lists/explode.cu +++ b/cpp/src/lists/explode.cu @@ -21,12 +21,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/lists/extract.cu b/cpp/src/lists/extract.cu index c0ce86fb56e..b6d22955e67 100644 --- a/cpp/src/lists/extract.cu +++ b/cpp/src/lists/extract.cu @@ -26,10 +26,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -105,7 +105,7 @@ std::unique_ptr make_index_offsets(size_type num_lists, rmm::cuda_ return cudf::detail::sequence(num_lists + 1, cudf::scalar_type_t(0, true, stream), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); } } // namespace diff --git a/cpp/src/lists/interleave_columns.cu b/cpp/src/lists/interleave_columns.cu index 45ae3671d4e..3d6fdda957b 100644 --- a/cpp/src/lists/interleave_columns.cu +++ b/cpp/src/lists/interleave_columns.cu @@ -24,12 +24,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -104,7 +104,7 @@ std::unique_ptr concatenate_and_gather_lists(host_span #include #include +#include #include #include -#include #include #include @@ -48,7 +48,7 @@ std::unique_ptr make_lists_column_from_scalar(list_scalar const& v stream, mr); } - auto mr_final = size == 1 ? mr : rmm::mr::get_current_device_resource(); + auto mr_final = size == 1 ? mr : cudf::get_current_device_resource_ref(); // Handcraft a 1-row column auto sizes_itr = thrust::constant_iterator(value.view().size()); diff --git a/cpp/src/lists/reverse.cu b/cpp/src/lists/reverse.cu index d913ce070ae..b80f6c882c8 100644 --- a/cpp/src/lists/reverse.cu +++ b/cpp/src/lists/reverse.cu @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -45,7 +45,7 @@ std::unique_ptr reverse(lists_column_view const& input, // The labels are also a map from each list element to its corresponding zero-based list index. auto const labels = - generate_labels(input, child.size(), stream, rmm::mr::get_current_device_resource()); + generate_labels(input, child.size(), stream, cudf::get_current_device_resource_ref()); // The offsets of the output lists column. auto out_offsets = get_normalized_offsets(input, stream, mr); diff --git a/cpp/src/lists/segmented_sort.cu b/cpp/src/lists/segmented_sort.cu index f920fb916eb..c78b6d793d4 100644 --- a/cpp/src/lists/segmented_sort.cu +++ b/cpp/src/lists/segmented_sort.cu @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/lists/sequences.cu b/cpp/src/lists/sequences.cu index 7d57d8ddb60..4b50bf626f2 100644 --- a/cpp/src/lists/sequences.cu +++ b/cpp/src/lists/sequences.cu @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/lists/set_operations.cu b/cpp/src/lists/set_operations.cu index 5c7ab68d64b..c0bc10dd266 100644 --- a/cpp/src/lists/set_operations.cu +++ b/cpp/src/lists/set_operations.cu @@ -27,12 +27,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -78,15 +78,15 @@ std::unique_ptr have_overlap(lists_column_view const& lhs, auto const lhs_child = lhs.get_sliced_child(stream); auto const rhs_child = rhs.get_sliced_child(stream); auto const lhs_labels = - generate_labels(lhs, lhs_child.size(), stream, rmm::mr::get_current_device_resource()); + generate_labels(lhs, lhs_child.size(), stream, cudf::get_current_device_resource_ref()); auto const rhs_labels = - generate_labels(rhs, rhs_child.size(), stream, rmm::mr::get_current_device_resource()); + generate_labels(rhs, rhs_child.size(), stream, cudf::get_current_device_resource_ref()); auto const lhs_table = table_view{{lhs_labels->view(), lhs_child}}; auto const rhs_table = table_view{{rhs_labels->view(), rhs_child}}; // Check existence for each row of the rhs_table in lhs_table. auto const contained = cudf::detail::contains( - lhs_table, rhs_table, nulls_equal, nans_equal, stream, rmm::mr::get_current_device_resource()); + lhs_table, rhs_table, nulls_equal, nans_equal, stream, cudf::get_current_device_resource_ref()); auto const num_rows = lhs.size(); @@ -148,20 +148,20 @@ std::unique_ptr intersect_distinct(lists_column_view const& lhs, auto const lhs_child = lhs.get_sliced_child(stream); auto const rhs_child = rhs.get_sliced_child(stream); auto const lhs_labels = - generate_labels(lhs, lhs_child.size(), stream, rmm::mr::get_current_device_resource()); + generate_labels(lhs, lhs_child.size(), stream, cudf::get_current_device_resource_ref()); auto const rhs_labels = - generate_labels(rhs, rhs_child.size(), stream, rmm::mr::get_current_device_resource()); + generate_labels(rhs, rhs_child.size(), stream, cudf::get_current_device_resource_ref()); auto const lhs_table = table_view{{lhs_labels->view(), lhs_child}}; auto const rhs_table = table_view{{rhs_labels->view(), rhs_child}}; auto const contained = cudf::detail::contains( - lhs_table, rhs_table, nulls_equal, nans_equal, stream, rmm::mr::get_current_device_resource()); + lhs_table, rhs_table, nulls_equal, nans_equal, stream, cudf::get_current_device_resource_ref()); auto const intersect_table = cudf::detail::copy_if( rhs_table, [contained = contained.begin()] __device__(auto const idx) { return contained[idx]; }, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // A stable algorithm is required to ensure that list labels remain contiguous. auto out_table = cudf::detail::stable_distinct(intersect_table->view(), @@ -205,7 +205,7 @@ std::unique_ptr union_distinct(lists_column_view const& lhs, lists::detail::concatenate_rows(table_view{{lhs.parent(), rhs.parent()}}, concatenate_null_policy::NULLIFY_OUTPUT_ROW, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return cudf::lists::detail::distinct( lists_column_view{union_col->view()}, nulls_equal, nans_equal, stream, mr); @@ -231,20 +231,20 @@ std::unique_ptr difference_distinct(lists_column_view const& lhs, auto const lhs_child = lhs.get_sliced_child(stream); auto const rhs_child = rhs.get_sliced_child(stream); auto const lhs_labels = - generate_labels(lhs, lhs_child.size(), stream, rmm::mr::get_current_device_resource()); + generate_labels(lhs, lhs_child.size(), stream, cudf::get_current_device_resource_ref()); auto const rhs_labels = - generate_labels(rhs, rhs_child.size(), stream, rmm::mr::get_current_device_resource()); + generate_labels(rhs, rhs_child.size(), stream, cudf::get_current_device_resource_ref()); auto const lhs_table = table_view{{lhs_labels->view(), lhs_child}}; auto const rhs_table = table_view{{rhs_labels->view(), rhs_child}}; auto const contained = cudf::detail::contains( - rhs_table, lhs_table, nulls_equal, nans_equal, stream, rmm::mr::get_current_device_resource()); + rhs_table, lhs_table, nulls_equal, nans_equal, stream, cudf::get_current_device_resource_ref()); auto const difference_table = cudf::detail::copy_if( lhs_table, [contained = contained.begin()] __device__(auto const idx) { return !contained[idx]; }, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // A stable algorithm is required to ensure that list labels remain contiguous. auto out_table = cudf::detail::stable_distinct(difference_table->view(), diff --git a/cpp/src/lists/stream_compaction/apply_boolean_mask.cu b/cpp/src/lists/stream_compaction/apply_boolean_mask.cu index 71aafa3ce12..c78e9c22e2a 100644 --- a/cpp/src/lists/stream_compaction/apply_boolean_mask.cu +++ b/cpp/src/lists/stream_compaction/apply_boolean_mask.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include #include #include @@ -73,7 +73,7 @@ std::unique_ptr apply_boolean_mask(lists_column_view const& input, null_policy::EXCLUDE, std::nullopt, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const d_sizes = column_device_view::create(*sizes, stream); auto const sizes_begin = cudf::detail::make_null_replacement_iterator(*d_sizes, size_type{0}); auto const sizes_end = sizes_begin + sizes->size(); diff --git a/cpp/src/lists/stream_compaction/distinct.cu b/cpp/src/lists/stream_compaction/distinct.cu index cdcb4aa957f..ab750de9ef2 100644 --- a/cpp/src/lists/stream_compaction/distinct.cu +++ b/cpp/src/lists/stream_compaction/distinct.cu @@ -25,9 +25,9 @@ #include #include #include +#include #include -#include #include #include @@ -50,7 +50,7 @@ std::unique_ptr distinct(lists_column_view const& input, auto const child = input.get_sliced_child(stream); auto const labels = - generate_labels(input, child.size(), stream, rmm::mr::get_current_device_resource()); + generate_labels(input, child.size(), stream, cudf::get_current_device_resource_ref()); auto const distinct_table = cudf::detail::stable_distinct(table_view{{labels->view(), child}}, // input table diff --git a/cpp/src/lists/utilities.cu b/cpp/src/lists/utilities.cu index 7fb960f02ca..53ddc27a8a5 100644 --- a/cpp/src/lists/utilities.cu +++ b/cpp/src/lists/utilities.cu @@ -19,8 +19,7 @@ #include #include #include - -#include +#include namespace cudf::lists::detail { diff --git a/cpp/src/lists/utilities.hpp b/cpp/src/lists/utilities.hpp index 218ad7872e9..c0fcf7b7182 100644 --- a/cpp/src/lists/utilities.hpp +++ b/cpp/src/lists/utilities.hpp @@ -18,10 +18,10 @@ #include #include +#include #include #include -#include namespace cudf::lists::detail { diff --git a/cpp/src/merge/merge.cu b/cpp/src/merge/merge.cu index e2c8d49a4ab..b9e0da0a3fe 100644 --- a/cpp/src/merge/merge.cu +++ b/cpp/src/merge/merge.cu @@ -34,13 +34,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include @@ -247,7 +247,7 @@ index_vector generate_merged_indices(table_view const& left_table, auto rhs_device_view = table_device_view::create(right_table, stream); auto d_column_order = cudf::detail::make_device_uvector_async( - column_order, stream, rmm::mr::get_current_device_resource()); + column_order, stream, cudf::get_current_device_resource_ref()); if (has_nulls) { auto const new_null_precedence = [&]() { @@ -261,7 +261,7 @@ index_vector generate_merged_indices(table_view const& left_table, }(); auto d_null_precedence = cudf::detail::make_device_uvector_async( - new_null_precedence, stream, rmm::mr::get_current_device_resource()); + new_null_precedence, stream, cudf::get_current_device_resource_ref()); auto ineq_op = detail::row_lexicographic_tagged_comparator( *lhs_device_view, *rhs_device_view, d_column_order, d_null_precedence); @@ -307,7 +307,7 @@ index_vector generate_merged_indices_nested(table_view const& left_table, column_order, null_precedence, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const left_indices = left_indices_col->view(); auto left_indices_mutable = left_indices_col->mutable_view(); auto const left_indices_begin = left_indices.begin(); @@ -647,7 +647,7 @@ table_ptr_type merge(std::vector const& tables_to_merge, // This utility will ensure all corresponding dictionary columns have matching keys. // It will return any new dictionary columns created as well as updated table_views. auto matched = cudf::dictionary::detail::match_dictionaries( - tables_to_merge, stream, rmm::mr::get_current_device_resource()); + tables_to_merge, stream, cudf::get_current_device_resource_ref()); auto merge_tables = matched.second; // A queue of (table view, table) pairs @@ -673,7 +673,7 @@ table_ptr_type merge(std::vector const& tables_to_merge, auto const right_table = top_and_pop(merge_queue); // Only use mr for the output table - auto const& new_tbl_mr = merge_queue.empty() ? mr : rmm::mr::get_current_device_resource(); + auto const& new_tbl_mr = merge_queue.empty() ? mr : cudf::get_current_device_resource_ref(); auto merged_table = merge(left_table.view, right_table.view, key_cols, diff --git a/cpp/src/partitioning/partitioning.cu b/cpp/src/partitioning/partitioning.cu index f10388794fc..17008e80e79 100644 --- a/cpp/src/partitioning/partitioning.cu +++ b/cpp/src/partitioning/partitioning.cu @@ -27,11 +27,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -501,10 +501,10 @@ std::pair, std::vector> hash_partition_table( // Holds the total number of rows in each partition auto global_partition_sizes = cudf::detail::make_zeroed_device_uvector_async( - num_partitions, stream, rmm::mr::get_current_device_resource()); + num_partitions, stream, cudf::get_current_device_resource_ref()); auto row_partition_offset = cudf::detail::make_zeroed_device_uvector_async( - num_rows, stream, rmm::mr::get_current_device_resource()); + num_rows, stream, cudf::get_current_device_resource_ref()); auto const row_hasher = experimental::row::hash::row_hasher(table_to_hash, stream); auto const hasher = diff --git a/cpp/src/partitioning/round_robin.cu b/cpp/src/partitioning/round_robin.cu index 9810373b751..5a4c90a67a5 100644 --- a/cpp/src/partitioning/round_robin.cu +++ b/cpp/src/partitioning/round_robin.cu @@ -26,12 +26,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/quantiles/quantile.cu b/cpp/src/quantiles/quantile.cu index 5d748de0019..80fd72a3088 100644 --- a/cpp/src/quantiles/quantile.cu +++ b/cpp/src/quantiles/quantile.cu @@ -30,11 +30,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -89,7 +89,7 @@ struct quantile_functor { auto d_output = mutable_column_device_view::create(output->mutable_view(), stream); auto q_device = - cudf::detail::make_device_uvector_sync(q, stream, rmm::mr::get_current_device_resource()); + cudf::detail::make_device_uvector_sync(q, stream, cudf::get_current_device_resource_ref()); if (!cudf::is_dictionary(input.type())) { auto sorted_data = diff --git a/cpp/src/quantiles/quantiles.cu b/cpp/src/quantiles/quantiles.cu index 0b0e6701304..69421f3bfc4 100644 --- a/cpp/src/quantiles/quantiles.cu +++ b/cpp/src/quantiles/quantiles.cu @@ -26,9 +26,9 @@ #include #include #include +#include #include -#include #include #include @@ -55,7 +55,7 @@ std::unique_ptr
quantiles(table_view const& input, }); auto const q_device = - cudf::detail::make_device_uvector_async(q, stream, rmm::mr::get_current_device_resource()); + cudf::detail::make_device_uvector_async(q, stream, cudf::get_current_device_resource_ref()); auto quantile_idx_iter = thrust::make_transform_iterator(q_device.begin(), quantile_idx_lookup); @@ -90,7 +90,7 @@ std::unique_ptr
quantiles(table_view const& input, input, thrust::make_counting_iterator(0), q, interp, stream, mr); } else { auto sorted_idx = detail::sorted_order( - input, column_order, null_precedence, stream, rmm::mr::get_current_device_resource()); + input, column_order, null_precedence, stream, cudf::get_current_device_resource_ref()); return detail::quantiles(input, sorted_idx->view().data(), q, interp, stream, mr); } } diff --git a/cpp/src/quantiles/tdigest/tdigest.cu b/cpp/src/quantiles/tdigest/tdigest.cu index 421ed26e26d..0d017cf1f13 100644 --- a/cpp/src/quantiles/tdigest/tdigest.cu +++ b/cpp/src/quantiles/tdigest/tdigest.cu @@ -25,10 +25,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -199,7 +199,7 @@ std::unique_ptr compute_approx_percentiles(tdigest_column_view const& in weight.size(), mask_state::UNALLOCATED, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto keys = cudf::detail::make_counting_transform_iterator( 0, cuda::proclaim_return_type( diff --git a/cpp/src/quantiles/tdigest/tdigest_aggregation.cu b/cpp/src/quantiles/tdigest/tdigest_aggregation.cu index 229af89fc46..2dd25a7b890 100644 --- a/cpp/src/quantiles/tdigest/tdigest_aggregation.cu +++ b/cpp/src/quantiles/tdigest/tdigest_aggregation.cu @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -1082,7 +1082,7 @@ std::unique_ptr merge_tdigests(tdigest_column_view const& tdv, {order::ASCENDING}, {}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); }); // generate min and max values @@ -1143,7 +1143,7 @@ std::unique_ptr merge_tdigests(tdigest_column_view const& tdv, std::back_inserter(tdigest_views), [](std::unique_ptr
const& t) { return t->view(); }); auto merged = - cudf::detail::concatenate(tdigest_views, stream, rmm::mr::get_current_device_resource()); + cudf::detail::concatenate(tdigest_views, stream, cudf::get_current_device_resource_ref()); // generate cumulative weights auto merged_weights = merged->get_column(1).view(); @@ -1220,7 +1220,7 @@ std::unique_ptr reduce_tdigest(column_view const& col, // order with nulls at the end. table_view t({col}); auto sorted = cudf::detail::sort( - t, {order::ASCENDING}, {null_order::AFTER}, stream, rmm::mr::get_current_device_resource()); + t, {order::ASCENDING}, {null_order::AFTER}, stream, cudf::get_current_device_resource_ref()); auto const delta = max_centroids; return cudf::type_dispatcher( diff --git a/cpp/src/reductions/all.cu b/cpp/src/reductions/all.cu index 11b0e2732fe..67ea29a2cb1 100644 --- a/cpp/src/reductions/all.cu +++ b/cpp/src/reductions/all.cu @@ -18,8 +18,7 @@ #include #include - -#include +#include #include #include @@ -66,7 +65,7 @@ struct all_fn { cudf::dictionary::detail::make_dictionary_pair_iterator(*d_dict, input.has_nulls()); return thrust::make_transform_iterator(pair_iter, null_iter); }(); - auto d_result = rmm::device_scalar(1, stream, rmm::mr::get_current_device_resource()); + auto d_result = rmm::device_scalar(1, stream, cudf::get_current_device_resource_ref()); thrust::for_each_n(rmm::exec_policy(stream), thrust::make_counting_iterator(0), input.size(), diff --git a/cpp/src/reductions/any.cu b/cpp/src/reductions/any.cu index 0ebeb7a48b9..057f038c622 100644 --- a/cpp/src/reductions/any.cu +++ b/cpp/src/reductions/any.cu @@ -18,8 +18,7 @@ #include #include - -#include +#include #include #include @@ -66,7 +65,7 @@ struct any_fn { cudf::dictionary::detail::make_dictionary_pair_iterator(*d_dict, input.has_nulls()); return thrust::make_transform_iterator(pair_iter, null_iter); }(); - auto d_result = rmm::device_scalar(0, stream, rmm::mr::get_current_device_resource()); + auto d_result = rmm::device_scalar(0, stream, cudf::get_current_device_resource_ref()); thrust::for_each_n(rmm::exec_policy(stream), thrust::make_counting_iterator(0), input.size(), diff --git a/cpp/src/reductions/collect_ops.cu b/cpp/src/reductions/collect_ops.cu index c1a1f117ee1..01dfb8f2c7d 100644 --- a/cpp/src/reductions/collect_ops.cu +++ b/cpp/src/reductions/collect_ops.cu @@ -22,8 +22,7 @@ #include #include #include - -#include +#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/compound.cuh b/cpp/src/reductions/compound.cuh index aa71546f049..6bc8b48832f 100644 --- a/cpp/src/reductions/compound.cuh +++ b/cpp/src/reductions/compound.cuh @@ -19,11 +19,10 @@ #include #include #include +#include #include #include -#include - #include namespace cudf { diff --git a/cpp/src/reductions/histogram.cu b/cpp/src/reductions/histogram.cu index d49c0c6f0d2..362b5f74c46 100644 --- a/cpp/src/reductions/histogram.cu +++ b/cpp/src/reductions/histogram.cu @@ -20,8 +20,7 @@ #include #include #include - -#include +#include #include #include @@ -223,7 +222,7 @@ compute_row_frequencies(table_view const& input, partial_counts ? partial_counts.value().begin() : nullptr}, histogram_count_type{0}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const input_it = thrust::make_zip_iterator( thrust::make_tuple(thrust::make_counting_iterator(0), reduction_results.begin())); diff --git a/cpp/src/reductions/max.cu b/cpp/src/reductions/max.cu index 682889f0fee..0434d043240 100644 --- a/cpp/src/reductions/max.cu +++ b/cpp/src/reductions/max.cu @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/mean.cu b/cpp/src/reductions/mean.cu index e8a10f02cc1..c5ab501f607 100644 --- a/cpp/src/reductions/mean.cu +++ b/cpp/src/reductions/mean.cu @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/min.cu b/cpp/src/reductions/min.cu index 7986bda5751..26b91ebe868 100644 --- a/cpp/src/reductions/min.cu +++ b/cpp/src/reductions/min.cu @@ -18,8 +18,7 @@ #include #include - -#include +#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/minmax.cu b/cpp/src/reductions/minmax.cu index 6cb58786971..139de068050 100644 --- a/cpp/src/reductions/minmax.cu +++ b/cpp/src/reductions/minmax.cu @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/reductions/nested_type_minmax_util.cuh b/cpp/src/reductions/nested_type_minmax_util.cuh index 3cf390d3574..6a2c4c44553 100644 --- a/cpp/src/reductions/nested_type_minmax_util.cuh +++ b/cpp/src/reductions/nested_type_minmax_util.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-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. @@ -22,6 +22,7 @@ #include #include #include +#include namespace cudf { namespace reduction { @@ -104,7 +105,7 @@ class comparison_binop_generator { std::vector{DEFAULT_NULL_ORDER}, cudf::structs::detail::column_nullability::MATCH_INCOMING, stream, - rmm::mr::get_current_device_resource())}, + cudf::get_current_device_resource_ref())}, row_comparator{[&input_, &input_tview = input_tview, &flattened_input = flattened_input, diff --git a/cpp/src/reductions/nth_element.cu b/cpp/src/reductions/nth_element.cu index e266f477c5d..4f6198696bd 100644 --- a/cpp/src/reductions/nth_element.cu +++ b/cpp/src/reductions/nth_element.cu @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/reductions/product.cu b/cpp/src/reductions/product.cu index 28ff8db3708..f5fd735a9f4 100644 --- a/cpp/src/reductions/product.cu +++ b/cpp/src/reductions/product.cu @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/reductions.cpp b/cpp/src/reductions/reductions.cpp index d4ea84742c7..d187375b69f 100644 --- a/cpp/src/reductions/reductions.cpp +++ b/cpp/src/reductions/reductions.cpp @@ -29,10 +29,10 @@ #include #include #include +#include #include #include -#include #include @@ -78,7 +78,7 @@ struct reduce_dispatch_functor { return standard_deviation(col, output_dtype, var_agg._ddof, stream, mr); } case aggregation::MEDIAN: { - auto current_mr = rmm::mr::get_current_device_resource(); + auto current_mr = cudf::get_current_device_resource_ref(); auto sorted_indices = cudf::detail::sorted_order( table_view{{col}}, {}, {null_order::AFTER}, stream, current_mr); auto valid_sorted_indices = @@ -91,7 +91,7 @@ struct reduce_dispatch_functor { auto quantile_agg = static_cast(agg); CUDF_EXPECTS(quantile_agg._quantiles.size() == 1, "Reduction quantile accepts only one quantile value"); - auto current_mr = rmm::mr::get_current_device_resource(); + auto current_mr = cudf::get_current_device_resource_ref(); auto sorted_indices = cudf::detail::sorted_order( table_view{{col}}, {}, {null_order::AFTER}, stream, current_mr); auto valid_sorted_indices = diff --git a/cpp/src/reductions/scan/rank_scan.cu b/cpp/src/reductions/scan/rank_scan.cu index 0dbfc271a25..6d0adc83359 100644 --- a/cpp/src/reductions/scan/rank_scan.cu +++ b/cpp/src/reductions/scan/rank_scan.cu @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -135,7 +135,7 @@ std::unique_ptr inclusive_one_normalized_percent_rank_scan( column_view const& order_by, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr) { auto const rank_column = - inclusive_rank_scan(order_by, stream, rmm::mr::get_current_device_resource()); + inclusive_rank_scan(order_by, stream, cudf::get_current_device_resource_ref()); auto const rank_view = rank_column->view(); // Result type for min 0-index percent rank is independent of input type. diff --git a/cpp/src/reductions/scan/scan.cpp b/cpp/src/reductions/scan/scan.cpp index de4dcf1de52..d3c0b54f286 100644 --- a/cpp/src/reductions/scan/scan.cpp +++ b/cpp/src/reductions/scan/scan.cpp @@ -20,8 +20,7 @@ #include #include #include - -#include +#include namespace cudf { diff --git a/cpp/src/reductions/scan/scan.cuh b/cpp/src/reductions/scan/scan.cuh index 6c237741ac3..76f98fe9a28 100644 --- a/cpp/src/reductions/scan/scan.cuh +++ b/cpp/src/reductions/scan/scan.cuh @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/reductions/scan/scan_exclusive.cu b/cpp/src/reductions/scan/scan_exclusive.cu index 7224bf47390..38ed0a68901 100644 --- a/cpp/src/reductions/scan/scan_exclusive.cu +++ b/cpp/src/reductions/scan/scan_exclusive.cu @@ -23,10 +23,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/reductions/scan/scan_inclusive.cu b/cpp/src/reductions/scan/scan_inclusive.cu index ee35d716d6e..a876d54d45f 100644 --- a/cpp/src/reductions/scan/scan_inclusive.cu +++ b/cpp/src/reductions/scan/scan_inclusive.cu @@ -28,10 +28,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/reductions/segmented/all.cu b/cpp/src/reductions/segmented/all.cu index 489fc6a283c..e59e6a6896b 100644 --- a/cpp/src/reductions/segmented/all.cu +++ b/cpp/src/reductions/segmented/all.cu @@ -17,8 +17,7 @@ #include "simple.cuh" #include - -#include +#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/any.cu b/cpp/src/reductions/segmented/any.cu index a9a8528548a..444ab689c39 100644 --- a/cpp/src/reductions/segmented/any.cu +++ b/cpp/src/reductions/segmented/any.cu @@ -17,8 +17,7 @@ #include "simple.cuh" #include - -#include +#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/compound.cuh b/cpp/src/reductions/segmented/compound.cuh index 035a8bdcd75..77fabbe485f 100644 --- a/cpp/src/reductions/segmented/compound.cuh +++ b/cpp/src/reductions/segmented/compound.cuh @@ -22,11 +22,10 @@ #include #include #include +#include #include #include -#include - #include #include @@ -73,7 +72,7 @@ std::unique_ptr compound_segmented_reduction(column_view const& col, offsets, null_handling, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // Run segmented reduction if (col.has_nulls()) { diff --git a/cpp/src/reductions/segmented/counts.cu b/cpp/src/reductions/segmented/counts.cu index 79737828678..5a072d6ca0a 100644 --- a/cpp/src/reductions/segmented/counts.cu +++ b/cpp/src/reductions/segmented/counts.cu @@ -17,8 +17,7 @@ #include "counts.hpp" #include - -#include +#include #include diff --git a/cpp/src/reductions/segmented/counts.hpp b/cpp/src/reductions/segmented/counts.hpp index f249644e564..c3f3e935f9a 100644 --- a/cpp/src/reductions/segmented/counts.hpp +++ b/cpp/src/reductions/segmented/counts.hpp @@ -17,11 +17,11 @@ #pragma once #include +#include #include #include #include -#include namespace cudf { class column_device_view; diff --git a/cpp/src/reductions/segmented/max.cu b/cpp/src/reductions/segmented/max.cu index 1c79edcc08c..49d0fe5f01c 100644 --- a/cpp/src/reductions/segmented/max.cu +++ b/cpp/src/reductions/segmented/max.cu @@ -17,8 +17,7 @@ #include "simple.cuh" #include - -#include +#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/mean.cu b/cpp/src/reductions/segmented/mean.cu index 8df6bee97e9..a9919086c8d 100644 --- a/cpp/src/reductions/segmented/mean.cu +++ b/cpp/src/reductions/segmented/mean.cu @@ -17,9 +17,9 @@ #include "compound.cuh" #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/min.cu b/cpp/src/reductions/segmented/min.cu index ae1d5ae42a4..052c81bc2c7 100644 --- a/cpp/src/reductions/segmented/min.cu +++ b/cpp/src/reductions/segmented/min.cu @@ -17,8 +17,7 @@ #include "simple.cuh" #include - -#include +#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/nunique.cu b/cpp/src/reductions/segmented/nunique.cu index d4fcf89e161..9b7e6f9fe57 100644 --- a/cpp/src/reductions/segmented/nunique.cu +++ b/cpp/src/reductions/segmented/nunique.cu @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/reductions/segmented/product.cu b/cpp/src/reductions/segmented/product.cu index 1b82e7e5aec..84e54ce6b6c 100644 --- a/cpp/src/reductions/segmented/product.cu +++ b/cpp/src/reductions/segmented/product.cu @@ -17,8 +17,7 @@ #include "simple.cuh" #include - -#include +#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/reductions.cpp b/cpp/src/reductions/segmented/reductions.cpp index e6de065dabb..40d1d8a0a53 100644 --- a/cpp/src/reductions/segmented/reductions.cpp +++ b/cpp/src/reductions/segmented/reductions.cpp @@ -22,10 +22,10 @@ #include #include #include +#include #include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/simple.cuh b/cpp/src/reductions/segmented/simple.cuh index da59df6b314..6c35e750e6b 100644 --- a/cpp/src/reductions/segmented/simple.cuh +++ b/cpp/src/reductions/segmented/simple.cuh @@ -28,12 +28,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -243,7 +243,7 @@ std::unique_ptr fixed_point_segmented_reduction( offsets, null_policy::EXCLUDE, // do not count nulls stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const max_count = thrust::reduce(rmm::exec_policy(stream), counts.begin(), diff --git a/cpp/src/reductions/segmented/std.cu b/cpp/src/reductions/segmented/std.cu index 0a7eb007f68..1d1a26e5176 100644 --- a/cpp/src/reductions/segmented/std.cu +++ b/cpp/src/reductions/segmented/std.cu @@ -17,9 +17,9 @@ #include "compound.cuh" #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/sum.cu b/cpp/src/reductions/segmented/sum.cu index bb06f6d7c8e..220148a7841 100644 --- a/cpp/src/reductions/segmented/sum.cu +++ b/cpp/src/reductions/segmented/sum.cu @@ -17,8 +17,7 @@ #include "simple.cuh" #include - -#include +#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/sum_of_squares.cu b/cpp/src/reductions/segmented/sum_of_squares.cu index 25d52f9bc79..6f3c1abd942 100644 --- a/cpp/src/reductions/segmented/sum_of_squares.cu +++ b/cpp/src/reductions/segmented/sum_of_squares.cu @@ -17,9 +17,9 @@ #include "simple.cuh" #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/segmented/update_validity.cu b/cpp/src/reductions/segmented/update_validity.cu index 92cfe5417ef..f0c3f0a0f0b 100644 --- a/cpp/src/reductions/segmented/update_validity.cu +++ b/cpp/src/reductions/segmented/update_validity.cu @@ -18,10 +18,9 @@ #include #include +#include #include -#include - namespace cudf { namespace reduction { namespace detail { diff --git a/cpp/src/reductions/segmented/update_validity.hpp b/cpp/src/reductions/segmented/update_validity.hpp index c143e1a4761..d60be8e92f4 100644 --- a/cpp/src/reductions/segmented/update_validity.hpp +++ b/cpp/src/reductions/segmented/update_validity.hpp @@ -19,10 +19,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/reductions/segmented/var.cu b/cpp/src/reductions/segmented/var.cu index 35f2771dfcf..f70943c19fc 100644 --- a/cpp/src/reductions/segmented/var.cu +++ b/cpp/src/reductions/segmented/var.cu @@ -17,9 +17,9 @@ #include "compound.cuh" #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/simple.cuh b/cpp/src/reductions/simple.cuh index 372ceccf60b..e897deee8a3 100644 --- a/cpp/src/reductions/simple.cuh +++ b/cpp/src/reductions/simple.cuh @@ -27,12 +27,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -344,7 +344,7 @@ struct same_element_type_dispatcher { dictionary_column_view(col).get_indices_annotated(), init, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return resolve_key(dictionary_column_view(col).keys(), *index, stream, mr); } diff --git a/cpp/src/reductions/std.cu b/cpp/src/reductions/std.cu index 9c78b35313b..38076b52b14 100644 --- a/cpp/src/reductions/std.cu +++ b/cpp/src/reductions/std.cu @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/sum.cu b/cpp/src/reductions/sum.cu index 51b251a836e..898eadb8435 100644 --- a/cpp/src/reductions/sum.cu +++ b/cpp/src/reductions/sum.cu @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/sum_of_squares.cu b/cpp/src/reductions/sum_of_squares.cu index dc0eae56e98..49917f3009e 100644 --- a/cpp/src/reductions/sum_of_squares.cu +++ b/cpp/src/reductions/sum_of_squares.cu @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/reductions/var.cu b/cpp/src/reductions/var.cu index aaab9dd4604..0e7b2fea9f8 100644 --- a/cpp/src/reductions/var.cu +++ b/cpp/src/reductions/var.cu @@ -18,9 +18,9 @@ #include #include +#include #include -#include namespace cudf { namespace reduction { diff --git a/cpp/src/replace/clamp.cu b/cpp/src/replace/clamp.cu index cb3caf9d068..7f605f08d8d 100644 --- a/cpp/src/replace/clamp.cu +++ b/cpp/src/replace/clamp.cu @@ -34,11 +34,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -258,7 +258,7 @@ std::unique_ptr dispatch_clamp::operator()( return result; }(); auto matched_view = dictionary_column_view(matched_column->view()); - auto default_mr = rmm::mr::get_current_device_resource(); + auto default_mr = cudf::get_current_device_resource_ref(); // get the indexes for lo_replace and for hi_replace auto lo_replace_index = diff --git a/cpp/src/replace/nans.cu b/cpp/src/replace/nans.cu index eba6f6b436e..394c2a2de80 100644 --- a/cpp/src/replace/nans.cu +++ b/cpp/src/replace/nans.cu @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/replace/nulls.cu b/cpp/src/replace/nulls.cu index 13e130588c1..1df1549432f 100644 --- a/cpp/src/replace/nulls.cu +++ b/cpp/src/replace/nulls.cu @@ -37,13 +37,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/replace/replace.cu b/cpp/src/replace/replace.cu index c2cd03cd761..86ec8cfc91e 100644 --- a/cpp/src/replace/replace.cu +++ b/cpp/src/replace/replace.cu @@ -48,12 +48,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -262,14 +262,14 @@ std::unique_ptr replace_kernel_forwarder::operator()({values.keys(), replacements.keys()}), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return cudf::dictionary::detail::add_keys(input, new_keys->view(), stream, mr); }(); auto matched_view = cudf::dictionary_column_view(matched_input->view()); auto matched_values = cudf::dictionary::detail::set_keys( - values, matched_view.keys(), stream, rmm::mr::get_current_device_resource()); + values, matched_view.keys(), stream, cudf::get_current_device_resource_ref()); auto matched_replacements = cudf::dictionary::detail::set_keys( - replacements, matched_view.keys(), stream, rmm::mr::get_current_device_resource()); + replacements, matched_view.keys(), stream, cudf::get_current_device_resource_ref()); auto indices_type = matched_view.indices().type(); auto new_indices = cudf::type_dispatcher( diff --git a/cpp/src/reshape/byte_cast.cu b/cpp/src/reshape/byte_cast.cu index 2a03a5504c1..0526594cbef 100644 --- a/cpp/src/reshape/byte_cast.cu +++ b/cpp/src/reshape/byte_cast.cu @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/reshape/interleave_columns.cu b/cpp/src/reshape/interleave_columns.cu index 7473b6045af..6c47d6f2216 100644 --- a/cpp/src/reshape/interleave_columns.cu +++ b/cpp/src/reshape/interleave_columns.cu @@ -29,10 +29,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/reshape/tile.cu b/cpp/src/reshape/tile.cu index 3d4fb73c000..45c40df3aeb 100644 --- a/cpp/src/reshape/tile.cu +++ b/cpp/src/reshape/tile.cu @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/rolling/detail/lead_lag_nested.cuh b/cpp/src/rolling/detail/lead_lag_nested.cuh index cfedcac8ae4..5d5fe9e4aa3 100644 --- a/cpp/src/rolling/detail/lead_lag_nested.cuh +++ b/cpp/src/rolling/detail/lead_lag_nested.cuh @@ -24,12 +24,11 @@ #include #include #include +#include #include #include #include -#include -#include #include #include @@ -200,7 +199,7 @@ std::unique_ptr compute_lead_lag_for_nested(aggregation::Kind op, out_of_bounds_policy::DONT_CHECK, cudf::detail::negative_index_policy::NOT_ALLOWED, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // Scatter defaults into locations where LEAD/LAG computed nulls. auto scattered_results = cudf::detail::scatter( diff --git a/cpp/src/rolling/detail/nth_element.cuh b/cpp/src/rolling/detail/nth_element.cuh index 571f4c02cb5..ce1e666d5a0 100644 --- a/cpp/src/rolling/detail/nth_element.cuh +++ b/cpp/src/rolling/detail/nth_element.cuh @@ -21,9 +21,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/rolling/detail/optimized_unbounded_window.cpp b/cpp/src/rolling/detail/optimized_unbounded_window.cpp index 4175c6e34c1..72c23395a93 100644 --- a/cpp/src/rolling/detail/optimized_unbounded_window.cpp +++ b/cpp/src/rolling/detail/optimized_unbounded_window.cpp @@ -25,8 +25,7 @@ #include #include #include - -#include +#include namespace cudf::detail { @@ -143,7 +142,7 @@ std::unique_ptr reduction_based_rolling_window(column_view const& input, return_dtype, std::nullopt, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); } }(); // Blow up results into separate column. diff --git a/cpp/src/rolling/detail/optimized_unbounded_window.hpp b/cpp/src/rolling/detail/optimized_unbounded_window.hpp index 153586b187f..5adba764e9d 100644 --- a/cpp/src/rolling/detail/optimized_unbounded_window.hpp +++ b/cpp/src/rolling/detail/optimized_unbounded_window.hpp @@ -16,9 +16,9 @@ #include #include +#include #include -#include namespace rmm::mr { class device_memory_resource; diff --git a/cpp/src/rolling/detail/rolling.cuh b/cpp/src/rolling/detail/rolling.cuh index c18bb9d9885..528700137bf 100644 --- a/cpp/src/rolling/detail/rolling.cuh +++ b/cpp/src/rolling/detail/rolling.cuh @@ -44,13 +44,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include @@ -928,7 +928,7 @@ class rolling_aggregation_postprocessor final : public cudf::detail::aggregation min_periods, agg._null_handling, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); result = lists::detail::distinct( lists_column_view{collected_list->view()}, agg._nulls_equal, agg._nans_equal, stream, mr); diff --git a/cpp/src/rolling/detail/rolling.hpp b/cpp/src/rolling/detail/rolling.hpp index 2624d982712..8820a6264e7 100644 --- a/cpp/src/rolling/detail/rolling.hpp +++ b/cpp/src/rolling/detail/rolling.hpp @@ -18,10 +18,9 @@ #include #include +#include #include -#include - namespace cudf { // helper functions - used in the rolling window implementation and tests diff --git a/cpp/src/rolling/detail/rolling_collect_list.cu b/cpp/src/rolling/detail/rolling_collect_list.cu index b259bd51fc4..8a98b65b406 100644 --- a/cpp/src/rolling/detail/rolling_collect_list.cu +++ b/cpp/src/rolling/detail/rolling_collect_list.cu @@ -18,9 +18,9 @@ #include #include +#include #include -#include #include #include diff --git a/cpp/src/rolling/detail/rolling_collect_list.cuh b/cpp/src/rolling/detail/rolling_collect_list.cuh index 7630898f820..f3eff6b0689 100644 --- a/cpp/src/rolling/detail/rolling_collect_list.cuh +++ b/cpp/src/rolling/detail/rolling_collect_list.cuh @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/rolling/detail/rolling_fixed_window.cu b/cpp/src/rolling/detail/rolling_fixed_window.cu index df0e72748ce..23424da13cd 100644 --- a/cpp/src/rolling/detail/rolling_fixed_window.cu +++ b/cpp/src/rolling/detail/rolling_fixed_window.cu @@ -20,8 +20,7 @@ #include #include - -#include +#include #include #include diff --git a/cpp/src/rolling/detail/rolling_variable_window.cu b/cpp/src/rolling/detail/rolling_variable_window.cu index 83e8faec291..c2324947ef6 100644 --- a/cpp/src/rolling/detail/rolling_variable_window.cu +++ b/cpp/src/rolling/detail/rolling_variable_window.cu @@ -18,8 +18,7 @@ #include #include - -#include +#include #include #include diff --git a/cpp/src/rolling/grouped_rolling.cu b/cpp/src/rolling/grouped_rolling.cu index 1158bf22494..ac6c7b11ef5 100644 --- a/cpp/src/rolling/grouped_rolling.cu +++ b/cpp/src/rolling/grouped_rolling.cu @@ -28,8 +28,7 @@ #include #include #include - -#include +#include #include #include @@ -605,9 +604,9 @@ get_null_bounds_for_orderby_column(column_view const& orderby_column, // When there are no nulls, just copy the input group offsets to the output. return std::make_tuple(cudf::detail::make_device_uvector_async( - group_offsets_span, stream, rmm::mr::get_current_device_resource()), + group_offsets_span, stream, cudf::get_current_device_resource_ref()), cudf::detail::make_device_uvector_async( - group_offsets_span, stream, rmm::mr::get_current_device_resource())); + group_offsets_span, stream, cudf::get_current_device_resource_ref())); } } diff --git a/cpp/src/rolling/rolling.cu b/cpp/src/rolling/rolling.cu index 5dff40a3396..651bf26b8d9 100644 --- a/cpp/src/rolling/rolling.cu +++ b/cpp/src/rolling/rolling.cu @@ -20,8 +20,7 @@ #include #include #include - -#include +#include namespace cudf { diff --git a/cpp/src/round/round.cu b/cpp/src/round/round.cu index 369ed039b66..8988d73fb02 100644 --- a/cpp/src/round/round.cu +++ b/cpp/src/round/round.cu @@ -30,11 +30,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/scalar/scalar.cpp b/cpp/src/scalar/scalar.cpp index 83209c55c8a..31535198c58 100644 --- a/cpp/src/scalar/scalar.cpp +++ b/cpp/src/scalar/scalar.cpp @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include @@ -591,7 +591,7 @@ table struct_scalar::init_data(table&& data, // push validity mask down auto const validity = cudf::detail::create_null_mask( - 1, mask_state::ALL_NULL, stream, rmm::mr::get_current_device_resource()); + 1, mask_state::ALL_NULL, stream, cudf::get_current_device_resource_ref()); for (auto& col : data_cols) { col = cudf::structs::detail::superimpose_nulls( static_cast(validity.data()), 1, std::move(col), stream, mr); diff --git a/cpp/src/scalar/scalar_factories.cpp b/cpp/src/scalar/scalar_factories.cpp index d59c5c9fc85..656fe61fbbe 100644 --- a/cpp/src/scalar/scalar_factories.cpp +++ b/cpp/src/scalar/scalar_factories.cpp @@ -19,11 +19,11 @@ #include #include #include +#include #include #include #include -#include namespace cudf { namespace { diff --git a/cpp/src/search/contains_column.cu b/cpp/src/search/contains_column.cu index 57f2c59de40..5d21e8f662c 100644 --- a/cpp/src/search/contains_column.cu +++ b/cpp/src/search/contains_column.cu @@ -21,9 +21,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace detail { @@ -59,10 +59,10 @@ std::unique_ptr contains_column_dispatch::operator()( dictionary_column_view const needles(needles_in); // first combine keys so both dictionaries have the same set auto needles_matched = dictionary::detail::add_keys( - needles, haystack.keys(), stream, rmm::mr::get_current_device_resource()); + needles, haystack.keys(), stream, cudf::get_current_device_resource_ref()); auto const needles_view = dictionary_column_view(needles_matched->view()); auto haystack_matched = dictionary::detail::set_keys( - haystack, needles_view.keys(), stream, rmm::mr::get_current_device_resource()); + haystack, needles_view.keys(), stream, cudf::get_current_device_resource_ref()); auto const haystack_view = dictionary_column_view(haystack_matched->view()); // now just use the indices for the contains diff --git a/cpp/src/search/contains_scalar.cu b/cpp/src/search/contains_scalar.cu index 2aa9e24174b..21f2d601d6b 100644 --- a/cpp/src/search/contains_scalar.cu +++ b/cpp/src/search/contains_scalar.cu @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -146,7 +147,7 @@ bool contains_scalar_dispatch::operator()(column_view const& auto const dict_col = cudf::dictionary_column_view(haystack); // first, find the needle in the dictionary's key set auto const index = cudf::dictionary::detail::get_index( - dict_col, needle, stream, rmm::mr::get_current_device_resource()); + dict_col, needle, stream, cudf::get_current_device_resource_ref()); // if found, check the index is actually in the indices column return index->is_valid(stream) && cudf::type_dispatcher(dict_col.indices().type(), contains_scalar_dispatch{}, diff --git a/cpp/src/search/contains_table.cu b/cpp/src/search/contains_table.cu index 66cefd0aa2f..2f6d23b7f7d 100644 --- a/cpp/src/search/contains_table.cu +++ b/cpp/src/search/contains_table.cu @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -119,7 +119,7 @@ std::pair build_row_bitmask(table_view if (nullable_columns.size() > 1) { auto row_bitmask = cudf::detail::bitmask_and( - table_view{nullable_columns}, stream, rmm::mr::get_current_device_resource()) + table_view{nullable_columns}, stream, cudf::get_current_device_resource_ref()) .first; auto const row_bitmask_ptr = static_cast(row_bitmask.data()); return std::pair(std::move(row_bitmask), row_bitmask_ptr); diff --git a/cpp/src/search/search_ordered.cu b/cpp/src/search/search_ordered.cu index 80651a4ec44..ac93e24b254 100644 --- a/cpp/src/search/search_ordered.cu +++ b/cpp/src/search/search_ordered.cu @@ -23,10 +23,10 @@ #include #include #include +#include #include #include -#include #include @@ -64,7 +64,7 @@ std::unique_ptr search_ordered(table_view const& haystack, // This utility will ensure all corresponding dictionary columns have matching keys. // It will return any new dictionary columns created as well as updated table_views. auto const matched = dictionary::detail::match_dictionaries( - {haystack, needles}, stream, rmm::mr::get_current_device_resource()); + {haystack, needles}, stream, cudf::get_current_device_resource_ref()); auto const& matched_haystack = matched.second.front(); auto const& matched_needles = matched.second.back(); diff --git a/cpp/src/sort/rank.cu b/cpp/src/sort/rank.cu index c5dcc7c240d..cbde87198bd 100644 --- a/cpp/src/sort/rank.cu +++ b/cpp/src/sort/rank.cu @@ -27,10 +27,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/sort/segmented_sort.cu b/cpp/src/sort/segmented_sort.cu index 408ac29b8a9..5dc5c39f2bc 100644 --- a/cpp/src/sort/segmented_sort.cu +++ b/cpp/src/sort/segmented_sort.cu @@ -20,10 +20,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/sort/segmented_sort_impl.cuh b/cpp/src/sort/segmented_sort_impl.cuh index 281fdfa6b8f..a397d4c6630 100644 --- a/cpp/src/sort/segmented_sort_impl.cuh +++ b/cpp/src/sort/segmented_sort_impl.cuh @@ -23,11 +23,10 @@ #include #include #include +#include #include #include -#include -#include #include @@ -77,7 +76,7 @@ struct column_fast_sort_fn { input.size(), mask_allocation_policy::NEVER, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); mutable_column_view output_view = temp_col->mutable_view(); auto temp_indices = cudf::column( cudf::column_view(indices.type(), indices.size(), indices.head(), nullptr, 0), stream); @@ -311,12 +310,13 @@ std::unique_ptr
segmented_sort_by_key_common(table_view const& values, { CUDF_EXPECTS(values.num_rows() == keys.num_rows(), "Mismatch in number of rows for values and keys"); - auto sorted_order = segmented_sorted_order_common(keys, - segment_offsets, - column_order, - null_precedence, - stream, - rmm::mr::get_current_device_resource()); + auto sorted_order = + segmented_sorted_order_common(keys, + segment_offsets, + column_order, + null_precedence, + stream, + cudf::get_current_device_resource_ref()); // Gather segmented sort of child value columns return detail::gather(values, sorted_order->view(), diff --git a/cpp/src/sort/sort.cu b/cpp/src/sort/sort.cu index 7216bc99e08..ac6fef17952 100644 --- a/cpp/src/sort/sort.cu +++ b/cpp/src/sort/sort.cu @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include #include #include @@ -53,7 +53,7 @@ std::unique_ptr
sort_by_key(table_view const& values, "Mismatch in number of rows for values and keys"); auto sorted_order = detail::sorted_order( - keys, column_order, null_precedence, stream, rmm::mr::get_current_device_resource()); + keys, column_order, null_precedence, stream, cudf::get_current_device_resource_ref()); return detail::gather(values, sorted_order->view(), diff --git a/cpp/src/sort/sort_column.cu b/cpp/src/sort/sort_column.cu index 99a45bf91a3..212f4728c05 100644 --- a/cpp/src/sort/sort_column.cu +++ b/cpp/src/sort/sort_column.cu @@ -19,10 +19,9 @@ #include #include +#include #include -#include - #include namespace cudf { diff --git a/cpp/src/sort/sort_column_impl.cuh b/cpp/src/sort/sort_column_impl.cuh index 564791e0b49..906cfb23894 100644 --- a/cpp/src/sort/sort_column_impl.cuh +++ b/cpp/src/sort/sort_column_impl.cuh @@ -21,11 +21,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/sort/sort_impl.cuh b/cpp/src/sort/sort_impl.cuh index 20e977e9fd5..d5efebf26e2 100644 --- a/cpp/src/sort/sort_impl.cuh +++ b/cpp/src/sort/sort_impl.cuh @@ -20,8 +20,7 @@ #include "sort_column_impl.cuh" #include - -#include +#include namespace cudf { namespace detail { diff --git a/cpp/src/sort/stable_segmented_sort.cu b/cpp/src/sort/stable_segmented_sort.cu index 61e37205c98..e814386db66 100644 --- a/cpp/src/sort/stable_segmented_sort.cu +++ b/cpp/src/sort/stable_segmented_sort.cu @@ -20,8 +20,7 @@ #include #include #include - -#include +#include namespace cudf { namespace detail { diff --git a/cpp/src/sort/stable_sort.cu b/cpp/src/sort/stable_sort.cu index ce05a755756..6ce4dfbead8 100644 --- a/cpp/src/sort/stable_sort.cu +++ b/cpp/src/sort/stable_sort.cu @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace detail { @@ -69,7 +69,7 @@ std::unique_ptr
stable_sort_by_key(table_view const& values, "Mismatch in number of rows for values and keys"); auto sorted_order = detail::stable_sorted_order( - keys, column_order, null_precedence, stream, rmm::mr::get_current_device_resource()); + keys, column_order, null_precedence, stream, cudf::get_current_device_resource_ref()); return detail::gather(values, sorted_order->view(), diff --git a/cpp/src/sort/stable_sort_column.cu b/cpp/src/sort/stable_sort_column.cu index bdb631a8154..e1aca9d9fe3 100644 --- a/cpp/src/sort/stable_sort_column.cu +++ b/cpp/src/sort/stable_sort_column.cu @@ -19,10 +19,9 @@ #include #include +#include #include -#include - #include namespace cudf { diff --git a/cpp/src/stream_compaction/apply_boolean_mask.cu b/cpp/src/stream_compaction/apply_boolean_mask.cu index 9812f4ffbd7..2c60687b92c 100644 --- a/cpp/src/stream_compaction/apply_boolean_mask.cu +++ b/cpp/src/stream_compaction/apply_boolean_mask.cu @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/stream_compaction/distinct.cu b/cpp/src/stream_compaction/distinct.cu index 24e2692cb6f..7d11b02d3e1 100644 --- a/cpp/src/stream_compaction/distinct.cu +++ b/cpp/src/stream_compaction/distinct.cu @@ -26,11 +26,10 @@ #include #include #include +#include #include #include -#include -#include #include #include @@ -134,7 +133,7 @@ std::unique_ptr
distinct(table_view const& input, nulls_equal, nans_equal, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return detail::gather(input, gather_map, out_of_bounds_policy::DONT_CHECK, diff --git a/cpp/src/stream_compaction/distinct_count.cu b/cpp/src/stream_compaction/distinct_count.cu index 78eb0fa5212..46a7f088298 100644 --- a/cpp/src/stream_compaction/distinct_count.cu +++ b/cpp/src/stream_compaction/distinct_count.cu @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -159,7 +160,7 @@ cudf::size_type distinct_count(table_view const& keys, // We must consider a row if any of its column entries is valid, // hence OR together the validities of the columns. auto const [row_bitmask, null_count] = - cudf::detail::bitmask_or(keys, stream, rmm::mr::get_current_device_resource()); + cudf::detail::bitmask_or(keys, stream, cudf::get_current_device_resource_ref()); // Unless all columns have a null mask, row_bitmask will be // null, and null_count will be zero. Equally, unless there is diff --git a/cpp/src/stream_compaction/distinct_helpers.hpp b/cpp/src/stream_compaction/distinct_helpers.hpp index bea02e3dbe8..f15807c2434 100644 --- a/cpp/src/stream_compaction/distinct_helpers.hpp +++ b/cpp/src/stream_compaction/distinct_helpers.hpp @@ -18,10 +18,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/stream_compaction/drop_nans.cu b/cpp/src/stream_compaction/drop_nans.cu index b98ebbc2ecc..8a53a2e8360 100644 --- a/cpp/src/stream_compaction/drop_nans.cu +++ b/cpp/src/stream_compaction/drop_nans.cu @@ -22,10 +22,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/stream_compaction/drop_nulls.cu b/cpp/src/stream_compaction/drop_nulls.cu index 2497e4e5065..22da762a0dd 100644 --- a/cpp/src/stream_compaction/drop_nulls.cu +++ b/cpp/src/stream_compaction/drop_nulls.cu @@ -22,9 +22,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/stream_compaction/stable_distinct.cu b/cpp/src/stream_compaction/stable_distinct.cu index 074d4fd7d1a..2097b7bd3d2 100644 --- a/cpp/src/stream_compaction/stable_distinct.cu +++ b/cpp/src/stream_compaction/stable_distinct.cu @@ -19,10 +19,9 @@ #include #include #include +#include #include -#include - #include #include #include @@ -47,7 +46,7 @@ std::unique_ptr
stable_distinct(table_view const& input, nulls_equal, nans_equal, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // The only difference between this implementation and the unstable version // is that the stable implementation must retain the input order. The diff --git a/cpp/src/stream_compaction/unique.cu b/cpp/src/stream_compaction/unique.cu index 93de0e60b6d..eaabc6f1272 100644 --- a/cpp/src/stream_compaction/unique.cu +++ b/cpp/src/stream_compaction/unique.cu @@ -31,11 +31,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/attributes.cu b/cpp/src/strings/attributes.cu index 778f546990d..c56d25fde2b 100644 --- a/cpp/src/strings/attributes.cu +++ b/cpp/src/strings/attributes.cu @@ -26,11 +26,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/capitalize.cu b/cpp/src/strings/capitalize.cu index 3f7a98381b8..45e80cc780d 100644 --- a/cpp/src/strings/capitalize.cu +++ b/cpp/src/strings/capitalize.cu @@ -25,9 +25,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/strings/case.cu b/cpp/src/strings/case.cu index 27befdea209..4c015f3cbed 100644 --- a/cpp/src/strings/case.cu +++ b/cpp/src/strings/case.cu @@ -29,10 +29,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/char_types/char_types.cu b/cpp/src/strings/char_types/char_types.cu index 58137aced0f..c3b4938da1a 100644 --- a/cpp/src/strings/char_types/char_types.cu +++ b/cpp/src/strings/char_types/char_types.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/strings/combine/concatenate.cu b/cpp/src/strings/combine/concatenate.cu index a2c77c5e77f..617ff41a043 100644 --- a/cpp/src/strings/combine/concatenate.cu +++ b/cpp/src/strings/combine/concatenate.cu @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/combine/join.cu b/cpp/src/strings/combine/join.cu index b534e9b2e5b..07e659e380e 100644 --- a/cpp/src/strings/combine/join.cu +++ b/cpp/src/strings/combine/join.cu @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/combine/join_list_elements.cu b/cpp/src/strings/combine/join_list_elements.cu index f5dfc1a2012..663dc9dda73 100644 --- a/cpp/src/strings/combine/join_list_elements.cu +++ b/cpp/src/strings/combine/join_list_elements.cu @@ -27,10 +27,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/strings/contains.cu b/cpp/src/strings/contains.cu index 79d241205df..67531fea579 100644 --- a/cpp/src/strings/contains.cu +++ b/cpp/src/strings/contains.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/convert/convert_booleans.cu b/cpp/src/strings/convert/convert_booleans.cu index d4ccb685061..3ba17fdb872 100644 --- a/cpp/src/strings/convert/convert_booleans.cu +++ b/cpp/src/strings/convert/convert_booleans.cu @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/convert/convert_datetime.cu b/cpp/src/strings/convert/convert_datetime.cu index 99c40f00b00..4c9eba5b526 100644 --- a/cpp/src/strings/convert/convert_datetime.cu +++ b/cpp/src/strings/convert/convert_datetime.cu @@ -28,13 +28,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include @@ -161,7 +161,7 @@ struct format_compiler { // copy format_items to device memory d_items = cudf::detail::make_device_uvector_async( - items, stream, rmm::mr::get_current_device_resource()); + items, stream, cudf::get_current_device_resource_ref()); } device_span format_items() { return device_span(d_items); } diff --git a/cpp/src/strings/convert/convert_durations.cu b/cpp/src/strings/convert/convert_durations.cu index 514ab965fc5..0db1adf1223 100644 --- a/cpp/src/strings/convert/convert_durations.cu +++ b/cpp/src/strings/convert/convert_durations.cu @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/convert/convert_fixed_point.cu b/cpp/src/strings/convert/convert_fixed_point.cu index 73089ad407e..9848c1f605e 100644 --- a/cpp/src/strings/convert/convert_fixed_point.cu +++ b/cpp/src/strings/convert/convert_fixed_point.cu @@ -27,11 +27,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/convert/convert_floats.cu b/cpp/src/strings/convert/convert_floats.cu index bd7b411d3c3..d3d90104252 100644 --- a/cpp/src/strings/convert/convert_floats.cu +++ b/cpp/src/strings/convert/convert_floats.cu @@ -25,12 +25,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/strings/convert/convert_hex.cu b/cpp/src/strings/convert/convert_hex.cu index a34b148a951..fce83e87645 100644 --- a/cpp/src/strings/convert/convert_hex.cu +++ b/cpp/src/strings/convert/convert_hex.cu @@ -24,12 +24,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/strings/convert/convert_integers.cu b/cpp/src/strings/convert/convert_integers.cu index aeabc71d300..b4eead05ce5 100644 --- a/cpp/src/strings/convert/convert_integers.cu +++ b/cpp/src/strings/convert/convert_integers.cu @@ -27,11 +27,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/convert/convert_ipv4.cu b/cpp/src/strings/convert/convert_ipv4.cu index 13d6e9bc3ba..c0c890341ae 100644 --- a/cpp/src/strings/convert/convert_ipv4.cu +++ b/cpp/src/strings/convert/convert_ipv4.cu @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/strings/convert/convert_lists.cu b/cpp/src/strings/convert/convert_lists.cu index 604f928430b..f574f091ab5 100644 --- a/cpp/src/strings/convert/convert_lists.cu +++ b/cpp/src/strings/convert/convert_lists.cu @@ -21,9 +21,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/convert/convert_urls.cu b/cpp/src/strings/convert/convert_urls.cu index 39907a38f2f..520f5897415 100644 --- a/cpp/src/strings/convert/convert_urls.cu +++ b/cpp/src/strings/convert/convert_urls.cu @@ -28,10 +28,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/strings/copying/concatenate.cu b/cpp/src/strings/copying/concatenate.cu index 352e0f9f41a..1d9d12686eb 100644 --- a/cpp/src/strings/copying/concatenate.cu +++ b/cpp/src/strings/copying/concatenate.cu @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -87,7 +87,7 @@ auto create_strings_device_views(host_span views, rmm::cuda_s }); thrust::inclusive_scan(thrust::host, offset_it, input_offsets.end(), offset_it); auto d_input_offsets = cudf::detail::make_device_uvector_async( - input_offsets, stream, rmm::mr::get_current_device_resource()); + input_offsets, stream, cudf::get_current_device_resource_ref()); auto const output_size = input_offsets.back(); // Compute the partition offsets and size of chars column diff --git a/cpp/src/strings/copying/copy_range.cu b/cpp/src/strings/copying/copy_range.cu index 2434de1795e..90865a4b73e 100644 --- a/cpp/src/strings/copying/copy_range.cu +++ b/cpp/src/strings/copying/copy_range.cu @@ -22,10 +22,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/copying/copying.cu b/cpp/src/strings/copying/copying.cu index e8b411d50a6..f923f99c131 100644 --- a/cpp/src/strings/copying/copying.cu +++ b/cpp/src/strings/copying/copying.cu @@ -21,11 +21,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/copying/shift.cu b/cpp/src/strings/copying/shift.cu index b386c0860d1..e36d5f9f14e 100644 --- a/cpp/src/strings/copying/shift.cu +++ b/cpp/src/strings/copying/shift.cu @@ -22,10 +22,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/count_matches.cu b/cpp/src/strings/count_matches.cu index 4ad3a75baf7..ae4e623a9e8 100644 --- a/cpp/src/strings/count_matches.cu +++ b/cpp/src/strings/count_matches.cu @@ -20,8 +20,7 @@ #include #include #include - -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/count_matches.hpp b/cpp/src/strings/count_matches.hpp index eab9863b975..f46168a3389 100644 --- a/cpp/src/strings/count_matches.hpp +++ b/cpp/src/strings/count_matches.hpp @@ -17,9 +17,9 @@ #pragma once #include +#include #include -#include namespace cudf { diff --git a/cpp/src/strings/extract/extract.cu b/cpp/src/strings/extract/extract.cu index b18b50d1b43..7323918dcff 100644 --- a/cpp/src/strings/extract/extract.cu +++ b/cpp/src/strings/extract/extract.cu @@ -26,10 +26,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/extract/extract_all.cu b/cpp/src/strings/extract/extract_all.cu index 897eba58833..a9fbb375e37 100644 --- a/cpp/src/strings/extract/extract_all.cu +++ b/cpp/src/strings/extract/extract_all.cu @@ -27,10 +27,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/filling/fill.cu b/cpp/src/strings/filling/fill.cu index 878d0fe11ba..6a2da3542c7 100644 --- a/cpp/src/strings/filling/fill.cu +++ b/cpp/src/strings/filling/fill.cu @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/strings/filter_chars.cu b/cpp/src/strings/filter_chars.cu index 48620af8cad..3e8b5e2af57 100644 --- a/cpp/src/strings/filter_chars.cu +++ b/cpp/src/strings/filter_chars.cu @@ -28,10 +28,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -134,8 +134,8 @@ std::unique_ptr filter_characters( characters_to_filter.begin(), characters_to_filter.end(), htable.begin(), [](auto entry) { return char_range{entry.first, entry.second}; }); - rmm::device_uvector table = - cudf::detail::make_device_uvector_async(htable, stream, rmm::mr::get_current_device_resource()); + rmm::device_uvector table = cudf::detail::make_device_uvector_async( + htable, stream, cudf::get_current_device_resource_ref()); auto d_strings = column_device_view::create(strings.parent(), stream); diff --git a/cpp/src/strings/like.cu b/cpp/src/strings/like.cu index 4df1b9b4ffe..f8db66f998b 100644 --- a/cpp/src/strings/like.cu +++ b/cpp/src/strings/like.cu @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/padding.cu b/cpp/src/strings/padding.cu index 0d146108436..fb2ce9a251a 100644 --- a/cpp/src/strings/padding.cu +++ b/cpp/src/strings/padding.cu @@ -24,9 +24,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/regex/utilities.cuh b/cpp/src/strings/regex/utilities.cuh index afbfe9de049..679907788bb 100644 --- a/cpp/src/strings/regex/utilities.cuh +++ b/cpp/src/strings/regex/utilities.cuh @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/strings/repeat_strings.cu b/cpp/src/strings/repeat_strings.cu index 022f1eb3232..eae4839b3e4 100644 --- a/cpp/src/strings/repeat_strings.cu +++ b/cpp/src/strings/repeat_strings.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/strings/replace/backref_re.cu b/cpp/src/strings/replace/backref_re.cu index 86afe4c8b9b..a46b5ebad4f 100644 --- a/cpp/src/strings/replace/backref_re.cu +++ b/cpp/src/strings/replace/backref_re.cu @@ -28,9 +28,9 @@ #include #include #include +#include #include -#include #include @@ -120,7 +120,7 @@ std::unique_ptr replace_with_backrefs(strings_column_view const& input, auto group_count = std::min(99, d_prog->group_counts()); // group count should NOT exceed 99 auto const parse_result = parse_backrefs(replacement, group_count); rmm::device_uvector backrefs = cudf::detail::make_device_uvector_async( - parse_result.second, stream, rmm::mr::get_current_device_resource()); + parse_result.second, stream, cudf::get_current_device_resource_ref()); string_scalar repl_scalar(parse_result.first, true, stream); string_view const d_repl_template = repl_scalar.value(stream); diff --git a/cpp/src/strings/replace/find_replace.cu b/cpp/src/strings/replace/find_replace.cu index 79bf6e3c910..8a8001dd81a 100644 --- a/cpp/src/strings/replace/find_replace.cu +++ b/cpp/src/strings/replace/find_replace.cu @@ -18,10 +18,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/replace/multi.cu b/cpp/src/strings/replace/multi.cu index b5248700d53..352d883bdc5 100644 --- a/cpp/src/strings/replace/multi.cu +++ b/cpp/src/strings/replace/multi.cu @@ -30,10 +30,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -321,9 +321,9 @@ std::unique_ptr replace_character_parallel(strings_column_view const& in get_offset_value(input.offsets(), input.offset(), stream); auto d_targets = - create_string_vector_from_column(targets, stream, rmm::mr::get_current_device_resource()); + create_string_vector_from_column(targets, stream, cudf::get_current_device_resource_ref()); auto d_replacements = - create_string_vector_from_column(repls, stream, rmm::mr::get_current_device_resource()); + create_string_vector_from_column(repls, stream, cudf::get_current_device_resource_ref()); replace_multi_parallel_fn fn{ *d_strings, @@ -361,7 +361,7 @@ std::unique_ptr replace_character_parallel(strings_column_view const& in // create a vector of offsets to each string's set of target positions auto const targets_offsets = create_offsets_from_positions( - input, targets_positions, stream, rmm::mr::get_current_device_resource()); + input, targets_positions, stream, cudf::get_current_device_resource_ref()); auto const d_targets_offsets = cudf::detail::offsetalator_factory::make_input_iterator(targets_offsets->view()); diff --git a/cpp/src/strings/replace/multi_re.cu b/cpp/src/strings/replace/multi_re.cu index 0ad3ab2305c..0777253bb38 100644 --- a/cpp/src/strings/replace/multi_re.cu +++ b/cpp/src/strings/replace/multi_re.cu @@ -29,9 +29,9 @@ #include #include #include +#include #include -#include #include #include @@ -180,7 +180,7 @@ std::unique_ptr replace_re(strings_column_view const& input, return *prog; }); auto d_progs = - cudf::detail::make_device_uvector_async(progs, stream, rmm::mr::get_current_device_resource()); + cudf::detail::make_device_uvector_async(progs, stream, cudf::get_current_device_resource_ref()); auto const d_strings = column_device_view::create(input.parent(), stream); auto const d_repls = column_device_view::create(replacements.parent(), stream); diff --git a/cpp/src/strings/replace/replace.cu b/cpp/src/strings/replace/replace.cu index f7a3a3aea5c..16df0dbabdf 100644 --- a/cpp/src/strings/replace/replace.cu +++ b/cpp/src/strings/replace/replace.cu @@ -29,10 +29,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -312,7 +312,7 @@ std::unique_ptr replace_character_parallel(strings_column_view const& in // create a vector of offsets to each string's set of target positions auto const targets_offsets = create_offsets_from_positions( - input, targets_positions, stream, rmm::mr::get_current_device_resource()); + input, targets_positions, stream, cudf::get_current_device_resource_ref()); auto const d_targets_offsets = cudf::detail::offsetalator_factory::make_input_iterator(targets_offsets->view()); diff --git a/cpp/src/strings/replace/replace_nulls.cu b/cpp/src/strings/replace/replace_nulls.cu index ffd9e6c2553..ff86501f02c 100644 --- a/cpp/src/strings/replace/replace_nulls.cu +++ b/cpp/src/strings/replace/replace_nulls.cu @@ -25,10 +25,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/replace/replace_re.cu b/cpp/src/strings/replace/replace_re.cu index fd988855424..19d660e312e 100644 --- a/cpp/src/strings/replace/replace_re.cu +++ b/cpp/src/strings/replace/replace_re.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/replace/replace_slice.cu b/cpp/src/strings/replace/replace_slice.cu index 04d81218a16..938e3c0270b 100644 --- a/cpp/src/strings/replace/replace_slice.cu +++ b/cpp/src/strings/replace/replace_slice.cu @@ -25,9 +25,9 @@ #include #include #include +#include #include -#include #include diff --git a/cpp/src/strings/reverse.cu b/cpp/src/strings/reverse.cu index cbd231bc5f3..a207215523d 100644 --- a/cpp/src/strings/reverse.cu +++ b/cpp/src/strings/reverse.cu @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/scan/scan_inclusive.cu b/cpp/src/strings/scan/scan_inclusive.cu index b3e45f65a21..84cc87bad3e 100644 --- a/cpp/src/strings/scan/scan_inclusive.cu +++ b/cpp/src/strings/scan/scan_inclusive.cu @@ -20,11 +20,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/search/find.cu b/cpp/src/strings/search/find.cu index 45eba39f413..9bd1abb5542 100644 --- a/cpp/src/strings/search/find.cu +++ b/cpp/src/strings/search/find.cu @@ -27,10 +27,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/search/find_multiple.cu b/cpp/src/strings/search/find_multiple.cu index 223a941a88a..ec7015878dd 100644 --- a/cpp/src/strings/search/find_multiple.cu +++ b/cpp/src/strings/search/find_multiple.cu @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/search/findall.cu b/cpp/src/strings/search/findall.cu index 2f7e7352458..067a513af96 100644 --- a/cpp/src/strings/search/findall.cu +++ b/cpp/src/strings/search/findall.cu @@ -28,10 +28,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/strings/slice.cu b/cpp/src/strings/slice.cu index d8324a9b08e..978a844c476 100644 --- a/cpp/src/strings/slice.cu +++ b/cpp/src/strings/slice.cu @@ -28,10 +28,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/split/partition.cu b/cpp/src/strings/split/partition.cu index 93d55c494fe..df1cdcc9d79 100644 --- a/cpp/src/strings/split/partition.cu +++ b/cpp/src/strings/split/partition.cu @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/split/split.cu b/cpp/src/strings/split/split.cu index bc01a46ca6d..352ca83c8b2 100644 --- a/cpp/src/strings/split/split.cu +++ b/cpp/src/strings/split/split.cu @@ -28,10 +28,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/split/split.cuh b/cpp/src/strings/split/split.cuh index af70367678e..81aca001d53 100644 --- a/cpp/src/strings/split/split.cuh +++ b/cpp/src/strings/split/split.cuh @@ -24,10 +24,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/strings/split/split_re.cu b/cpp/src/strings/split/split_re.cu index d273c93ec12..ef96b9d3f36 100644 --- a/cpp/src/strings/split/split_re.cu +++ b/cpp/src/strings/split/split_re.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include #include #include @@ -152,7 +152,7 @@ std::pair, std::unique_ptr> gener auto const end = begin + strings_count; auto [offsets, total_tokens] = cudf::detail::make_offsets_child_column( - begin, end, stream, rmm::mr::get_current_device_resource()); + begin, end, stream, cudf::get_current_device_resource_ref()); auto const d_offsets = cudf::detail::offsetalator_factory::make_input_iterator(offsets->view()); // build a vector of tokens @@ -211,7 +211,7 @@ std::unique_ptr
split_re(strings_column_view const& input, // count the number of delimiters matched in each string auto const counts = - count_matches(*d_strings, *d_prog, stream, rmm::mr::get_current_device_resource()); + count_matches(*d_strings, *d_prog, stream, cudf::get_current_device_resource_ref()); // get the split tokens from the input column; this also converts the counts into offsets auto [tokens, offsets] = diff --git a/cpp/src/strings/split/split_record.cu b/cpp/src/strings/split/split_record.cu index 3e8be750b9e..6f14462faf1 100644 --- a/cpp/src/strings/split/split_record.cu +++ b/cpp/src/strings/split/split_record.cu @@ -27,9 +27,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/strings/strings_column_factories.cu b/cpp/src/strings/strings_column_factories.cu index a298285f841..07516f91dcf 100644 --- a/cpp/src/strings/strings_column_factories.cu +++ b/cpp/src/strings/strings_column_factories.cu @@ -21,11 +21,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/strings_scalar_factories.cpp b/cpp/src/strings/strings_scalar_factories.cpp index cf973638cc4..219d1174d42 100644 --- a/cpp/src/strings/strings_scalar_factories.cpp +++ b/cpp/src/strings/strings_scalar_factories.cpp @@ -16,9 +16,9 @@ #include #include +#include #include -#include namespace cudf { // Create a strings-type column from array of pointer/size pairs diff --git a/cpp/src/strings/strip.cu b/cpp/src/strings/strip.cu index 639097abe63..0dc4c038a02 100644 --- a/cpp/src/strings/strip.cu +++ b/cpp/src/strings/strip.cu @@ -23,10 +23,10 @@ #include #include #include +#include #include #include -#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/translate.cu b/cpp/src/strings/translate.cu index a242b008a54..22ab5d4fe81 100644 --- a/cpp/src/strings/translate.cu +++ b/cpp/src/strings/translate.cu @@ -25,10 +25,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -107,8 +107,8 @@ std::unique_ptr translate(strings_column_view const& strings, return lhs.first < rhs.first; }); // copy translate table to device memory - rmm::device_uvector table = - cudf::detail::make_device_uvector_async(htable, stream, rmm::mr::get_current_device_resource()); + rmm::device_uvector table = cudf::detail::make_device_uvector_async( + htable, stream, cudf::get_current_device_resource_ref()); auto d_strings = column_device_view::create(strings.parent(), stream); diff --git a/cpp/src/strings/utilities.cu b/cpp/src/strings/utilities.cu index 068d89a52dc..45bd4615435 100644 --- a/cpp/src/strings/utilities.cu +++ b/cpp/src/strings/utilities.cu @@ -26,11 +26,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/strings/wrap.cu b/cpp/src/strings/wrap.cu index dff1891c3cc..38a18aff98d 100644 --- a/cpp/src/strings/wrap.cu +++ b/cpp/src/strings/wrap.cu @@ -25,11 +25,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/structs/copying/concatenate.cu b/cpp/src/structs/copying/concatenate.cu index 2ccf071711a..2120b4f08c4 100644 --- a/cpp/src/structs/copying/concatenate.cu +++ b/cpp/src/structs/copying/concatenate.cu @@ -23,9 +23,9 @@ #include #include #include +#include #include -#include #include #include diff --git a/cpp/src/structs/scan/scan_inclusive.cu b/cpp/src/structs/scan/scan_inclusive.cu index a6ccea5fca1..28756b25c89 100644 --- a/cpp/src/structs/scan/scan_inclusive.cu +++ b/cpp/src/structs/scan/scan_inclusive.cu @@ -20,11 +20,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/structs/structs_column_factories.cu b/cpp/src/structs/structs_column_factories.cu index bbe2bb96fde..86b30d0ccbd 100644 --- a/cpp/src/structs/structs_column_factories.cu +++ b/cpp/src/structs/structs_column_factories.cu @@ -17,9 +17,9 @@ #include #include #include +#include #include -#include #include diff --git a/cpp/src/structs/utilities.cpp b/cpp/src/structs/utilities.cpp index 81806c92e23..5df9943303d 100644 --- a/cpp/src/structs/utilities.cpp +++ b/cpp/src/structs/utilities.cpp @@ -25,11 +25,10 @@ #include #include #include +#include #include #include -#include - #include #include diff --git a/cpp/src/table/row_operators.cu b/cpp/src/table/row_operators.cu index 2969557c78f..990c4855a14 100644 --- a/cpp/src/table/row_operators.cu +++ b/cpp/src/table/row_operators.cu @@ -27,12 +27,10 @@ #include #include #include +#include #include #include -#include -#include - #include namespace cudf { @@ -319,7 +317,7 @@ auto list_lex_preprocess(table_view const& table, rmm::cuda_stream_view stream) } } auto d_dremel_device_views = detail::make_device_uvector_sync( - dremel_device_views, stream, rmm::mr::get_current_device_resource()); + dremel_device_views, stream, cudf::get_current_device_resource_ref()); return std::make_tuple(std::move(dremel_data), std::move(d_dremel_device_views)); } @@ -588,12 +586,12 @@ transform_lists_of_structs(column_view const& lhs, auto const concatenated_children = cudf::detail::concatenate(std::vector{child_lhs, child_rhs}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const ranks = compute_ranks(concatenated_children->view(), column_null_order, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const ranks_slices = cudf::detail::slice( ranks->view(), {0, child_lhs.size(), child_lhs.size(), child_lhs.size() + child_rhs.size()}, @@ -647,13 +645,13 @@ std::shared_ptr preprocessed_table::create( { check_lex_compatibility(preprocessed_input); - auto d_table = table_device_view::create(preprocessed_input, stream); - auto d_column_order = - detail::make_device_uvector_async(column_order, stream, rmm::mr::get_current_device_resource()); + auto d_table = table_device_view::create(preprocessed_input, stream); + auto d_column_order = detail::make_device_uvector_async( + column_order, stream, cudf::get_current_device_resource_ref()); auto d_null_precedence = detail::make_device_uvector_async( - null_precedence, stream, rmm::mr::get_current_device_resource()); + null_precedence, stream, cudf::get_current_device_resource_ref()); auto d_depths = detail::make_device_uvector_async( - verticalized_col_depths, stream, rmm::mr::get_current_device_resource()); + verticalized_col_depths, stream, cudf::get_current_device_resource_ref()); if (detail::has_nested_columns(preprocessed_input)) { auto [dremel_data, d_dremel_device_view] = list_lex_preprocess(preprocessed_input, stream); @@ -699,7 +697,7 @@ std::shared_ptr preprocessed_table::create( lhs_col, null_precedence.empty() ? null_order::BEFORE : new_null_precedence[col_idx], stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); transformed_cvs.emplace_back(std::move(transformed)); transformed_columns.insert(transformed_columns.end(), @@ -761,7 +759,7 @@ preprocessed_table::create(table_view const& lhs, rhs_col, null_precedence.empty() ? null_order::BEFORE : null_precedence[col_idx], stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); transformed_lhs_cvs.emplace_back(std::move(transformed_lhs)); transformed_rhs_cvs.emplace_back(std::move(transformed_rhs)); @@ -854,7 +852,7 @@ std::shared_ptr preprocessed_table::create(table_view const& check_eq_compatibility(t); auto [null_pushed_table, nullable_data] = - structs::detail::push_down_nulls(t, stream, rmm::mr::get_current_device_resource()); + structs::detail::push_down_nulls(t, stream, cudf::get_current_device_resource_ref()); auto struct_offset_removed_table = remove_struct_child_offsets(null_pushed_table); auto verticalized_t = std::get<0>(decompose_structs(struct_offset_removed_table, decompose_lists_column::YES)); diff --git a/cpp/src/table/table.cpp b/cpp/src/table/table.cpp index 9dac7be5efe..cb707c94288 100644 --- a/cpp/src/table/table.cpp +++ b/cpp/src/table/table.cpp @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include namespace cudf { diff --git a/cpp/src/text/bpe/byte_pair_encoding.cu b/cpp/src/text/bpe/byte_pair_encoding.cu index e196eee275f..f46f49ddc0e 100644 --- a/cpp/src/text/bpe/byte_pair_encoding.cu +++ b/cpp/src/text/bpe/byte_pair_encoding.cu @@ -29,12 +29,12 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/text/bpe/load_merge_pairs.cu b/cpp/src/text/bpe/load_merge_pairs.cu index 9fb86aecce3..cd68566bdec 100644 --- a/cpp/src/text/bpe/load_merge_pairs.cu +++ b/cpp/src/text/bpe/load_merge_pairs.cu @@ -23,12 +23,12 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/text/detokenize.cu b/cpp/src/text/detokenize.cu index 6635b61093e..15cb53c7c28 100644 --- a/cpp/src/text/detokenize.cu +++ b/cpp/src/text/detokenize.cu @@ -27,12 +27,12 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -148,7 +148,7 @@ std::unique_ptr detokenize(cudf::strings_column_view const& string auto strings_column = cudf::column_device_view::create(strings.parent(), stream); // the indices may not be in order so we need to build a sorted map auto sorted_rows = cudf::detail::stable_sorted_order( - cudf::table_view({row_indices}), {}, {}, stream, rmm::mr::get_current_device_resource()); + cudf::table_view({row_indices}), {}, {}, stream, cudf::get_current_device_resource_ref()); auto const d_row_map = sorted_rows->view().data(); // create offsets for the tokens for each output string diff --git a/cpp/src/text/edit_distance.cu b/cpp/src/text/edit_distance.cu index 8d857175407..b04e9961e01 100644 --- a/cpp/src/text/edit_distance.cu +++ b/cpp/src/text/edit_distance.cu @@ -22,13 +22,13 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/text/generate_ngrams.cu b/cpp/src/text/generate_ngrams.cu index 6f700f84ec4..a87ecb81b9d 100644 --- a/cpp/src/text/generate_ngrams.cu +++ b/cpp/src/text/generate_ngrams.cu @@ -29,12 +29,12 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -122,7 +122,7 @@ std::unique_ptr generate_ngrams(cudf::strings_column_view const& s return !d_strings.element(idx).empty(); }, stream, - rmm::mr::get_current_device_resource()) + cudf::get_current_device_resource_ref()) ->release(); strings_count = table_offsets.front()->size() - 1; auto result = std::move(table_offsets.front()); diff --git a/cpp/src/text/jaccard.cu b/cpp/src/text/jaccard.cu index e856b89b836..2de94a4eb59 100644 --- a/cpp/src/text/jaccard.cu +++ b/cpp/src/text/jaccard.cu @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/cpp/src/text/minhash.cu b/cpp/src/text/minhash.cu index 4318123627d..605582f28a6 100644 --- a/cpp/src/text/minhash.cu +++ b/cpp/src/text/minhash.cu @@ -28,12 +28,12 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/text/ngrams_tokenize.cu b/cpp/src/text/ngrams_tokenize.cu index 95dd8ff3d6c..eee293268a2 100644 --- a/cpp/src/text/ngrams_tokenize.cu +++ b/cpp/src/text/ngrams_tokenize.cu @@ -27,13 +27,13 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -166,7 +166,7 @@ std::unique_ptr ngrams_tokenize(cudf::strings_column_view const& s auto const count_itr = cudf::detail::make_counting_transform_iterator(0, strings_tokenizer{d_strings, d_delimiter}); auto [token_offsets, total_tokens] = cudf::strings::detail::make_offsets_child_column( - count_itr, count_itr + strings_count, stream, rmm::mr::get_current_device_resource()); + count_itr, count_itr + strings_count, stream, cudf::get_current_device_resource_ref()); auto d_token_offsets = cudf::detail::offsetalator_factory::make_input_iterator(token_offsets->view()); @@ -191,7 +191,7 @@ std::unique_ptr ngrams_tokenize(cudf::strings_column_view const& s return (token_count >= ngrams) ? token_count - ngrams + 1 : 0; })); auto [ngram_offsets, total_ngrams] = cudf::detail::make_offsets_child_column( - ngram_counts, ngram_counts + strings_count, stream, rmm::mr::get_current_device_resource()); + ngram_counts, ngram_counts + strings_count, stream, cudf::get_current_device_resource_ref()); auto d_ngram_offsets = ngram_offsets->view().begin(); // Compute the total size of the ngrams for each string (not for each ngram) @@ -207,7 +207,7 @@ std::unique_ptr ngrams_tokenize(cudf::strings_column_view const& s auto const sizes_itr = cudf::detail::make_counting_transform_iterator( 0, ngram_builder_fn{d_strings, d_separator, ngrams, d_token_offsets, d_token_positions}); auto [chars_offsets, output_chars_size] = cudf::strings::detail::make_offsets_child_column( - sizes_itr, sizes_itr + strings_count, stream, rmm::mr::get_current_device_resource()); + sizes_itr, sizes_itr + strings_count, stream, cudf::get_current_device_resource_ref()); auto d_chars_offsets = cudf::detail::offsetalator_factory::make_input_iterator(chars_offsets->view()); diff --git a/cpp/src/text/normalize.cu b/cpp/src/text/normalize.cu index 4db11dc5beb..7e2b766862d 100644 --- a/cpp/src/text/normalize.cu +++ b/cpp/src/text/normalize.cu @@ -32,11 +32,11 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/text/replace.cu b/cpp/src/text/replace.cu index 81c787caf86..943bcbe9b3a 100644 --- a/cpp/src/text/replace.cu +++ b/cpp/src/text/replace.cu @@ -28,11 +28,11 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/text/stemmer.cu b/cpp/src/text/stemmer.cu index 4746b6b74b9..379e68b891b 100644 --- a/cpp/src/text/stemmer.cu +++ b/cpp/src/text/stemmer.cu @@ -25,12 +25,12 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/text/subword/load_hash_file.cu b/cpp/src/text/subword/load_hash_file.cu index a08fdea3e84..eca703e2604 100644 --- a/cpp/src/text/subword/load_hash_file.cu +++ b/cpp/src/text/subword/load_hash_file.cu @@ -22,13 +22,13 @@ #include #include #include +#include #include #include #include #include -#include #include diff --git a/cpp/src/text/subword/subword_tokenize.cu b/cpp/src/text/subword/subword_tokenize.cu index e05427eb6ac..d7e04a0c208 100644 --- a/cpp/src/text/subword/subword_tokenize.cu +++ b/cpp/src/text/subword/subword_tokenize.cu @@ -25,13 +25,13 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/text/tokenize.cu b/cpp/src/text/tokenize.cu index 3ce6064d9c2..df25950e6d5 100644 --- a/cpp/src/text/tokenize.cu +++ b/cpp/src/text/tokenize.cu @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include @@ -79,14 +79,14 @@ std::unique_ptr tokenize_fn(cudf::size_type strings_count, { // get the number of tokens in each string auto const token_counts = - token_count_fn(strings_count, tokenizer, stream, rmm::mr::get_current_device_resource()); + token_count_fn(strings_count, tokenizer, stream, cudf::get_current_device_resource_ref()); auto d_token_counts = token_counts->view(); // create token-index offsets from the counts auto [token_offsets, total_tokens] = cudf::detail::make_offsets_child_column(d_token_counts.template begin(), d_token_counts.template end(), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // build a list of pointers to each token rmm::device_uvector tokens(total_tokens, stream); // now go get the tokens diff --git a/cpp/src/text/vocabulary_tokenize.cu b/cpp/src/text/vocabulary_tokenize.cu index 5945921ed9d..a2297987732 100644 --- a/cpp/src/text/vocabulary_tokenize.cu +++ b/cpp/src/text/vocabulary_tokenize.cu @@ -32,11 +32,11 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/transform/bools_to_mask.cu b/cpp/src/transform/bools_to_mask.cu index 452aebf4428..f365d690fde 100644 --- a/cpp/src/transform/bools_to_mask.cu +++ b/cpp/src/transform/bools_to_mask.cu @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include -#include namespace cudf { namespace detail { diff --git a/cpp/src/transform/compute_column.cu b/cpp/src/transform/compute_column.cu index c4fc8d58552..93105b321dd 100644 --- a/cpp/src/transform/compute_column.cu +++ b/cpp/src/transform/compute_column.cu @@ -30,11 +30,11 @@ #include #include #include +#include #include #include #include -#include namespace cudf { namespace detail { diff --git a/cpp/src/transform/encode.cu b/cpp/src/transform/encode.cu index 1c9d52bce1b..cffb77ba776 100644 --- a/cpp/src/transform/encode.cu +++ b/cpp/src/transform/encode.cu @@ -27,11 +27,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/transform/mask_to_bools.cu b/cpp/src/transform/mask_to_bools.cu index be0b80a2633..fe1f6674e8b 100644 --- a/cpp/src/transform/mask_to_bools.cu +++ b/cpp/src/transform/mask_to_bools.cu @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/cpp/src/transform/nans_to_nulls.cu b/cpp/src/transform/nans_to_nulls.cu index a24ba304004..adb8852c6e6 100644 --- a/cpp/src/transform/nans_to_nulls.cu +++ b/cpp/src/transform/nans_to_nulls.cu @@ -22,11 +22,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/transform/one_hot_encode.cu b/cpp/src/transform/one_hot_encode.cu index 46e6e55b0b7..e1a784a985e 100644 --- a/cpp/src/transform/one_hot_encode.cu +++ b/cpp/src/transform/one_hot_encode.cu @@ -24,12 +24,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/cpp/src/transform/row_bit_count.cu b/cpp/src/transform/row_bit_count.cu index 6a965d10184..66bbe532e46 100644 --- a/cpp/src/transform/row_bit_count.cu +++ b/cpp/src/transform/row_bit_count.cu @@ -28,11 +28,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -526,7 +526,7 @@ std::unique_ptr segmented_row_bit_count(table_view const& t, // move stack info to the gpu rmm::device_uvector d_info = - cudf::detail::make_device_uvector_async(info, stream, rmm::mr::get_current_device_resource()); + cudf::detail::make_device_uvector_async(info, stream, cudf::get_current_device_resource_ref()); // each thread needs to maintain a stack of row spans of size max_branch_depth. we will use // shared memory to do this rather than allocating a potentially gigantic temporary buffer diff --git a/cpp/src/transform/transform.cpp b/cpp/src/transform/transform.cpp index f5e9048fa0a..52b96bc9039 100644 --- a/cpp/src/transform/transform.cpp +++ b/cpp/src/transform/transform.cpp @@ -24,11 +24,11 @@ #include #include #include +#include #include #include #include -#include #include diff --git a/cpp/src/transpose/transpose.cu b/cpp/src/transpose/transpose.cu index abde43535be..810fd8afd73 100644 --- a/cpp/src/transpose/transpose.cu +++ b/cpp/src/transpose/transpose.cu @@ -22,11 +22,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/unary/cast_ops.cu b/cpp/src/unary/cast_ops.cu index ec21813705a..0913796a527 100644 --- a/cpp/src/unary/cast_ops.cu +++ b/cpp/src/unary/cast_ops.cu @@ -27,12 +27,12 @@ #include #include #include +#include #include #include #include #include -#include #include diff --git a/cpp/src/unary/math_ops.cu b/cpp/src/unary/math_ops.cu index ab17da5f8c4..1d506c59cd9 100644 --- a/cpp/src/unary/math_ops.cu +++ b/cpp/src/unary/math_ops.cu @@ -22,10 +22,10 @@ #include #include #include +#include #include #include -#include #include @@ -349,7 +349,7 @@ std::unique_ptr transform_fn(cudf::dictionary_column_view const& i { auto dictionary_view = cudf::column_device_view::create(input.parent(), stream); auto dictionary_itr = dictionary::detail::make_dictionary_iterator(*dictionary_view); - auto default_mr = rmm::mr::get_current_device_resource(); + auto default_mr = cudf::get_current_device_resource_ref(); // call unary-op using temporary output buffer auto output = transform_fn(dictionary_itr, dictionary_itr + input.size(), diff --git a/cpp/src/unary/nan_ops.cu b/cpp/src/unary/nan_ops.cu index 08aa8755624..17a90a14248 100644 --- a/cpp/src/unary/nan_ops.cu +++ b/cpp/src/unary/nan_ops.cu @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include namespace cudf { namespace detail { diff --git a/cpp/src/unary/null_ops.cu b/cpp/src/unary/null_ops.cu index a223a090128..f6514ea265b 100644 --- a/cpp/src/unary/null_ops.cu +++ b/cpp/src/unary/null_ops.cu @@ -18,8 +18,7 @@ #include #include #include - -#include +#include #include diff --git a/cpp/src/unary/unary_ops.cuh b/cpp/src/unary/unary_ops.cuh index 61c41705665..34a20d88f37 100644 --- a/cpp/src/unary/unary_ops.cuh +++ b/cpp/src/unary/unary_ops.cuh @@ -21,10 +21,10 @@ #include #include #include +#include #include #include -#include #include diff --git a/cpp/src/utilities/host_memory.cpp b/cpp/src/utilities/host_memory.cpp index 7c3cea42023..125b98c4a67 100644 --- a/cpp/src/utilities/host_memory.cpp +++ b/cpp/src/utilities/host_memory.cpp @@ -18,12 +18,12 @@ #include #include #include +#include #include #include #include #include -#include namespace cudf { diff --git a/cpp/tests/bitmask/bitmask_tests.cpp b/cpp/tests/bitmask/bitmask_tests.cpp index 4bf648bed5a..fe221fb1c48 100644 --- a/cpp/tests/bitmask/bitmask_tests.cpp +++ b/cpp/tests/bitmask/bitmask_tests.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -90,7 +91,7 @@ rmm::device_uvector make_mask(cudf::size_type size, bool fil { if (!fill_valid) { return cudf::detail::make_zeroed_device_uvector_sync( - size, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + size, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); } else { auto ret = rmm::device_uvector(size, cudf::get_default_stream()); CUDF_CUDA_TRY(cudaMemsetAsync(ret.data(), diff --git a/cpp/tests/bitmask/valid_if_tests.cu b/cpp/tests/bitmask/valid_if_tests.cu index 65143ec17f1..96f122f21a8 100644 --- a/cpp/tests/bitmask/valid_if_tests.cu +++ b/cpp/tests/bitmask/valid_if_tests.cu @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -43,7 +44,7 @@ TEST_F(ValidIfTest, EmptyRange) thrust::make_counting_iterator(0), odds_valid{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const& buffer = actual.first; EXPECT_EQ(0u, buffer.size()); EXPECT_EQ(nullptr, buffer.data()); @@ -56,7 +57,7 @@ TEST_F(ValidIfTest, InvalidRange) thrust::make_counting_iterator(0), odds_valid{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()), + cudf::get_current_device_resource_ref()), cudf::logic_error); } @@ -68,7 +69,7 @@ TEST_F(ValidIfTest, OddsValid) thrust::make_counting_iterator(10000), odds_valid{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_EQUAL_BUFFERS(expected.first.data(), actual.first.data(), expected.first.size()); EXPECT_EQ(5000, actual.second); EXPECT_EQ(expected.second, actual.second); @@ -82,7 +83,7 @@ TEST_F(ValidIfTest, AllValid) thrust::make_counting_iterator(10000), all_valid{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_EQUAL_BUFFERS(expected.first.data(), actual.first.data(), expected.first.size()); EXPECT_EQ(0, actual.second); EXPECT_EQ(expected.second, actual.second); @@ -96,7 +97,7 @@ TEST_F(ValidIfTest, AllNull) thrust::make_counting_iterator(10000), all_null{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_EQUAL_BUFFERS(expected.first.data(), actual.first.data(), expected.first.size()); EXPECT_EQ(10000, actual.second); EXPECT_EQ(expected.second, actual.second); diff --git a/cpp/tests/column/column_test.cpp b/cpp/tests/column/column_test.cpp index 1ba9b14dc1f..14b4197de71 100644 --- a/cpp/tests/column/column_test.cpp +++ b/cpp/tests/column/column_test.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -373,7 +374,7 @@ TYPED_TEST(TypedColumnTest, DeviceUvectorConstructorNoMask) this->num_elements()); auto original = cudf::detail::make_device_uvector_async( - data, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + data, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto original_data = original.data(); cudf::column moved_to{std::move(original), rmm::device_buffer{}, 0}; verify_column_views(moved_to); @@ -389,7 +390,7 @@ TYPED_TEST(TypedColumnTest, DeviceUvectorConstructorWithMask) this->num_elements()); auto original = cudf::detail::make_device_uvector_async( - data, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + data, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto original_data = original.data(); auto original_mask = this->all_valid_mask.data(); cudf::column moved_to{std::move(original), std::move(this->all_valid_mask), 0}; diff --git a/cpp/tests/copying/detail_gather_tests.cu b/cpp/tests/copying/detail_gather_tests.cu index 17ced5ccd34..b9ae91afd1e 100644 --- a/cpp/tests/copying/detail_gather_tests.cu +++ b/cpp/tests/copying/detail_gather_tests.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-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. @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -62,7 +63,7 @@ TYPED_TEST(GatherTest, GatherDetailDeviceVectorTest) gather_map.end(), cudf::out_of_bounds_policy::DONT_CHECK, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); for (auto i = 0; i < source_table.num_columns(); ++i) { CUDF_TEST_EXPECT_COLUMNS_EQUAL(source_table.column(i), result->view().column(i)); @@ -79,7 +80,7 @@ TYPED_TEST(GatherTest, GatherDetailDeviceVectorTest) gather_map.data() + gather_map.size(), cudf::out_of_bounds_policy::DONT_CHECK, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); for (auto i = 0; i < source_table.num_columns(); ++i) { CUDF_TEST_EXPECT_COLUMNS_EQUAL(source_table.column(i), result->view().column(i)); @@ -107,7 +108,7 @@ TYPED_TEST(GatherTest, GatherDetailInvalidIndexTest) cudf::out_of_bounds_policy::NULLIFY, cudf::detail::negative_index_policy::NOT_ALLOWED, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto expect_data = cudf::detail::make_counting_transform_iterator(0, [](auto i) { return (i % 2) ? 0 : i; }); diff --git a/cpp/tests/copying/gather_str_tests.cpp b/cpp/tests/copying/gather_str_tests.cpp index b31f34504e7..28098878086 100644 --- a/cpp/tests/copying/gather_str_tests.cpp +++ b/cpp/tests/copying/gather_str_tests.cpp @@ -24,8 +24,7 @@ #include #include #include - -#include +#include class GatherTestStr : public cudf::test::BaseFixture {}; @@ -91,7 +90,7 @@ TEST_F(GatherTestStr, Gather) cudf::out_of_bounds_policy::NULLIFY, cudf::detail::negative_index_policy::NOT_ALLOWED, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); std::vector h_expected; std::vector expected_validity; @@ -122,7 +121,7 @@ TEST_F(GatherTestStr, GatherDontCheckOutOfBounds) cudf::out_of_bounds_policy::DONT_CHECK, cudf::detail::negative_index_policy::NOT_ALLOWED, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); std::vector h_expected; for (int itr : h_map) { @@ -141,7 +140,7 @@ TEST_F(GatherTestStr, GatherEmptyMapStringsColumn) cudf::out_of_bounds_policy::NULLIFY, cudf::detail::negative_index_policy::NOT_ALLOWED, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); cudf::test::expect_column_empty(results->get_column(0).view()); } @@ -155,6 +154,6 @@ TEST_F(GatherTestStr, GatherZeroSizeStringsColumn) cudf::out_of_bounds_policy::NULLIFY, cudf::detail::negative_index_policy::NOT_ALLOWED, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(expected, results->get_column(0).view()); } diff --git a/cpp/tests/copying/shift_tests.cpp b/cpp/tests/copying/shift_tests.cpp index 01ad4f2247c..ff6808d9a79 100644 --- a/cpp/tests/copying/shift_tests.cpp +++ b/cpp/tests/copying/shift_tests.cpp @@ -23,10 +23,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -37,7 +37,7 @@ using TestTypes = cudf::test::Types; template > std::unique_ptr make_scalar( rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto s = new ScalarType(cudf::test::make_type_param_scalar(0), false, stream, mr); return std::unique_ptr(s); @@ -47,7 +47,7 @@ template > std::unique_ptr make_scalar( T value, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto s = new ScalarType(value, true, stream, mr); return std::unique_ptr(s); diff --git a/cpp/tests/copying/split_tests.cpp b/cpp/tests/copying/split_tests.cpp index 7ff159cf896..ee3e7da5e0f 100644 --- a/cpp/tests/copying/split_tests.cpp +++ b/cpp/tests/copying/split_tests.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -1383,7 +1384,7 @@ struct ContiguousSplitTest : public cudf::test::BaseFixture {}; std::vector do_chunked_pack(cudf::table_view const& input) { - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); rmm::device_buffer bounce_buff(1 * 1024 * 1024, cudf::get_default_stream(), mr); auto bounce_buff_span = @@ -2383,7 +2384,7 @@ TEST_F(ContiguousSplitTableCornerCases, ChunkSpanTooSmall) { auto chunked_pack = cudf::chunked_pack::create({}, 1 * 1024 * 1024); rmm::device_buffer buff( - 1 * 1024, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()); + 1 * 1024, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()); cudf::device_span too_small(static_cast(buff.data()), buff.size()); std::size_t copied = 0; // throws because we created chunked_contig_split with 1MB, but we are giving @@ -2396,7 +2397,7 @@ TEST_F(ContiguousSplitTableCornerCases, EmptyTableHasNextFalse) { auto chunked_pack = cudf::chunked_pack::create({}, 1 * 1024 * 1024); rmm::device_buffer buff( - 1 * 1024 * 1024, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()); + 1 * 1024 * 1024, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()); cudf::device_span bounce_buff(static_cast(buff.data()), buff.size()); EXPECT_EQ(chunked_pack->has_next(), false); // empty input table std::size_t copied = 0; @@ -2409,7 +2410,7 @@ TEST_F(ContiguousSplitTableCornerCases, ExhaustedHasNextFalse) cudf::test::strings_column_wrapper a{"abc", "def", "ghi", "jkl", "mno", "", "st", "uvwx"}; cudf::table_view t({a}); rmm::device_buffer buff( - 1 * 1024 * 1024, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()); + 1 * 1024 * 1024, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()); cudf::device_span bounce_buff(static_cast(buff.data()), buff.size()); auto chunked_pack = cudf::chunked_pack::create(t, buff.size()); EXPECT_EQ(chunked_pack->has_next(), true); diff --git a/cpp/tests/device_atomics/device_atomics_test.cu b/cpp/tests/device_atomics/device_atomics_test.cu index ccf5ccae187..b81f8196d89 100644 --- a/cpp/tests/device_atomics/device_atomics_test.cu +++ b/cpp/tests/device_atomics/device_atomics_test.cu @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -144,9 +145,9 @@ struct AtomicsTest : public cudf::test::BaseFixture { result_init[5] = result_init[2]; auto dev_data = cudf::detail::make_device_uvector_sync( - v, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + v, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto dev_result = cudf::detail::make_device_uvector_sync( - result_init, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + result_init, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); if (block_size == 0) { block_size = vec_size; } diff --git a/cpp/tests/dictionary/search_test.cpp b/cpp/tests/dictionary/search_test.cpp index 1b73576e083..25501b4fde7 100644 --- a/cpp/tests/dictionary/search_test.cpp +++ b/cpp/tests/dictionary/search_test.cpp @@ -20,6 +20,7 @@ #include #include +#include struct DictionarySearchTest : public cudf::test::BaseFixture {}; @@ -39,7 +40,7 @@ TEST_F(DictionarySearchTest, StringsColumn) result = cudf::dictionary::detail::get_insert_index(dictionary, cudf::string_scalar("eee"), cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); n_result = dynamic_cast*>(result.get()); EXPECT_EQ(uint32_t{5}, n_result->value()); } @@ -59,7 +60,7 @@ TEST_F(DictionarySearchTest, WithNulls) result = cudf::dictionary::detail::get_insert_index(dictionary, cudf::numeric_scalar(5), cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); n_result = dynamic_cast*>(result.get()); EXPECT_EQ(uint32_t{1}, n_result->value()); } @@ -71,7 +72,7 @@ TEST_F(DictionarySearchTest, EmptyColumn) auto result = cudf::dictionary::get_index(dictionary, key); EXPECT_FALSE(result->is_valid()); result = cudf::dictionary::detail::get_insert_index( - dictionary, key, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + dictionary, key, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); EXPECT_FALSE(result->is_valid()); } @@ -82,6 +83,6 @@ TEST_F(DictionarySearchTest, Errors) EXPECT_THROW(cudf::dictionary::get_index(dictionary, key), cudf::data_type_error); EXPECT_THROW( cudf::dictionary::detail::get_insert_index( - dictionary, key, cudf::get_default_stream(), rmm::mr::get_current_device_resource()), + dictionary, key, cudf::get_default_stream(), cudf::get_current_device_resource_ref()), cudf::data_type_error); } diff --git a/cpp/tests/fixed_point/fixed_point_tests.cu b/cpp/tests/fixed_point/fixed_point_tests.cu index 24b4e335840..f34760341d8 100644 --- a/cpp/tests/fixed_point/fixed_point_tests.cu +++ b/cpp/tests/fixed_point/fixed_point_tests.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-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. @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -82,7 +83,7 @@ TEST_F(FixedPointTest, DecimalXXThrustOnDevice) std::vector vec1(1000, decimal32{1, scale_type{-2}}); auto d_vec1 = cudf::detail::make_device_uvector_sync( - vec1, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + vec1, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const sum = thrust::reduce(rmm::exec_policy(cudf::get_default_stream()), std::cbegin(d_vec1), @@ -96,7 +97,7 @@ TEST_F(FixedPointTest, DecimalXXThrustOnDevice) thrust::inclusive_scan(std::cbegin(vec1), std::cend(vec1), std::begin(vec1)); d_vec1 = cudf::detail::make_device_uvector_sync( - vec1, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + vec1, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); std::vector vec2(1000); std::iota(std::begin(vec2), std::end(vec2), 1); diff --git a/cpp/tests/groupby/histogram_tests.cpp b/cpp/tests/groupby/histogram_tests.cpp index 612486d8e5c..2d447025919 100644 --- a/cpp/tests/groupby/histogram_tests.cpp +++ b/cpp/tests/groupby/histogram_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-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. @@ -24,6 +24,7 @@ #include #include #include +#include using int32s_col = cudf::test::fixed_width_column_wrapper; using int64s_col = cudf::test::fixed_width_column_wrapper; @@ -68,7 +69,7 @@ auto groupby_histogram(cudf::column_view const& keys, cudf::order::ASCENDING, cudf::null_order::BEFORE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return std::pair{std::move(sorted_keys), std::move(sorted_histograms)}; } diff --git a/cpp/tests/groupby/tdigest_tests.cu b/cpp/tests/groupby/tdigest_tests.cu index 97edc1c45a7..baa59026b07 100644 --- a/cpp/tests/groupby/tdigest_tests.cu +++ b/cpp/tests/groupby/tdigest_tests.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023, NVIDIA CORPORATION. + * Copyright (c) 2021-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. @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -468,16 +469,16 @@ TEST_F(TDigestMergeTest, EmptyGroups) cudf::test::fixed_width_column_wrapper keys{0, 0, 0, 0, 0, 0, 0}; int const delta = 1000; - auto a = cudf::tdigest::detail::make_empty_tdigest_column(cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + auto a = cudf::tdigest::detail::make_empty_tdigest_column( + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto b = cudf::type_dispatcher( static_cast(values_b).type(), tdigest_gen_grouped{}, keys, values_b, delta); - auto c = cudf::tdigest::detail::make_empty_tdigest_column(cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + auto c = cudf::tdigest::detail::make_empty_tdigest_column( + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d = cudf::type_dispatcher( static_cast(values_d).type(), tdigest_gen_grouped{}, keys, values_d, delta); - auto e = cudf::tdigest::detail::make_empty_tdigest_column(cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + auto e = cudf::tdigest::detail::make_empty_tdigest_column( + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); std::vector cols; cols.push_back(*a); diff --git a/cpp/tests/io/json/json_chunked_reader.cu b/cpp/tests/io/json/json_chunked_reader.cu index b9dee54752c..c9ee6542a4d 100644 --- a/cpp/tests/io/json/json_chunked_reader.cu +++ b/cpp/tests/io/json/json_chunked_reader.cu @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -63,7 +63,7 @@ TEST_F(JsonReaderTest, ByteRange_SingleSource) json_lines_options, chunk_size, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto table_views = std::vector(tables.size()); std::transform(tables.begin(), tables.end(), table_views.begin(), [](auto& table) { @@ -158,7 +158,7 @@ TEST_F(JsonReaderTest, ByteRange_MultiSource) json_lines_options, chunk_size, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto table_views = std::vector(tables.size()); std::transform(tables.begin(), tables.end(), table_views.begin(), [](auto& table) { diff --git a/cpp/tests/io/json/json_quote_normalization_test.cpp b/cpp/tests/io/json/json_quote_normalization_test.cpp index 3a9ba8d9f3b..d23acf3ae00 100644 --- a/cpp/tests/io/json/json_quote_normalization_test.cpp +++ b/cpp/tests/io/json/json_quote_normalization_test.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -43,7 +44,7 @@ void run_test(std::string const& host_input, std::string const& expected_host_ou auto stream_view = cudf::test::get_default_stream(); auto device_input = rmm::device_buffer( - host_input.c_str(), host_input.size(), stream_view, rmm::mr::get_current_device_resource()); + host_input.c_str(), host_input.size(), stream_view, cudf::get_current_device_resource_ref()); // Preprocessing FST cudf::io::datasource::owning_buffer device_data(std::move(device_input)); diff --git a/cpp/tests/io/json/json_tree.cpp b/cpp/tests/io/json/json_tree.cpp index 8bcd5790e99..875cc467b6a 100644 --- a/cpp/tests/io/json/json_tree.cpp +++ b/cpp/tests/io/json/json_tree.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -590,11 +591,11 @@ TEST_F(JsonTest, TreeRepresentation) // Parse the JSON and get the token stream auto const [tokens_gpu, token_indices_gpu] = cudf::io::json::detail::get_token_stream( - d_input, options, stream, rmm::mr::get_current_device_resource()); + d_input, options, stream, cudf::get_current_device_resource_ref()); // Get the JSON's tree representation auto gpu_tree = cuio_json::detail::get_tree_representation( - tokens_gpu, token_indices_gpu, false, stream, rmm::mr::get_current_device_resource()); + tokens_gpu, token_indices_gpu, false, stream, cudf::get_current_device_resource_ref()); // host tree generation auto cpu_tree = get_tree_representation_cpu(tokens_gpu, token_indices_gpu, options, stream); compare_trees(cpu_tree, gpu_tree); @@ -678,11 +679,11 @@ TEST_F(JsonTest, TreeRepresentation2) // Parse the JSON and get the token stream auto const [tokens_gpu, token_indices_gpu] = cudf::io::json::detail::get_token_stream( - d_input, options, stream, rmm::mr::get_current_device_resource()); + d_input, options, stream, cudf::get_current_device_resource_ref()); // Get the JSON's tree representation auto gpu_tree = cuio_json::detail::get_tree_representation( - tokens_gpu, token_indices_gpu, false, stream, rmm::mr::get_current_device_resource()); + tokens_gpu, token_indices_gpu, false, stream, cudf::get_current_device_resource_ref()); // host tree generation auto cpu_tree = get_tree_representation_cpu(tokens_gpu, token_indices_gpu, options, stream); compare_trees(cpu_tree, gpu_tree); @@ -753,11 +754,11 @@ TEST_F(JsonTest, TreeRepresentation3) // Parse the JSON and get the token stream auto const [tokens_gpu, token_indices_gpu] = cudf::io::json::detail::get_token_stream( - d_input, options, stream, rmm::mr::get_current_device_resource()); + d_input, options, stream, cudf::get_current_device_resource_ref()); // Get the JSON's tree representation auto gpu_tree = cuio_json::detail::get_tree_representation( - tokens_gpu, token_indices_gpu, false, stream, rmm::mr::get_current_device_resource()); + tokens_gpu, token_indices_gpu, false, stream, cudf::get_current_device_resource_ref()); // host tree generation auto cpu_tree = get_tree_representation_cpu(tokens_gpu, token_indices_gpu, options, stream); compare_trees(cpu_tree, gpu_tree); @@ -779,13 +780,13 @@ TEST_F(JsonTest, TreeRepresentationError) // Parse the JSON and get the token stream auto const [tokens_gpu, token_indices_gpu] = cudf::io::json::detail::get_token_stream( - d_input, options, stream, rmm::mr::get_current_device_resource()); + d_input, options, stream, cudf::get_current_device_resource_ref()); // Get the JSON's tree representation // This JSON is invalid and will raise an exception. EXPECT_THROW( cuio_json::detail::get_tree_representation( - tokens_gpu, token_indices_gpu, false, stream, rmm::mr::get_current_device_resource()), + tokens_gpu, token_indices_gpu, false, stream, cudf::get_current_device_resource_ref()), cudf::logic_error); } @@ -862,7 +863,7 @@ TEST_P(JsonTreeTraversalTest, CPUvsGPUTraversal) // Parse the JSON and get the token stream auto const [tokens_gpu, token_indices_gpu] = cudf::io::json::detail::get_token_stream( - d_input, options, stream, rmm::mr::get_current_device_resource()); + d_input, options, stream, cudf::get_current_device_resource_ref()); // host tree generation auto cpu_tree = get_tree_representation_cpu(tokens_gpu, token_indices_gpu, options, stream); bool const is_array_of_arrays = @@ -875,7 +876,7 @@ TEST_P(JsonTreeTraversalTest, CPUvsGPUTraversal) records_orient_tree_traversal_cpu(input, cpu_tree, is_array_of_arrays, json_lines, stream); // gpu tree generation auto gpu_tree = cuio_json::detail::get_tree_representation( - tokens_gpu, token_indices_gpu, false, stream, rmm::mr::get_current_device_resource()); + tokens_gpu, token_indices_gpu, false, stream, cudf::get_current_device_resource_ref()); #if LIBCUDF_JSON_DEBUG_DUMP printf("BEFORE traversal (gpu_tree):\n"); @@ -889,7 +890,7 @@ TEST_P(JsonTreeTraversalTest, CPUvsGPUTraversal) is_array_of_arrays, json_lines, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); #if LIBCUDF_JSON_DEBUG_DUMP printf("AFTER traversal (gpu_tree):\n"); print_tree(gpu_tree); diff --git a/cpp/tests/io/json/json_type_cast_test.cu b/cpp/tests/io/json/json_type_cast_test.cu index fe430010f4b..c18d4189626 100644 --- a/cpp/tests/io/json/json_type_cast_test.cu +++ b/cpp/tests/io/json/json_type_cast_test.cu @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -73,7 +74,7 @@ auto default_json_options() TEST_F(JSONTypeCastTest, String) { auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); auto const type = cudf::data_type{cudf::type_id::STRING}; auto in_valids = cudf::detail::make_counting_transform_iterator(0, [](auto i) { return i != 4; }); @@ -110,7 +111,7 @@ TEST_F(JSONTypeCastTest, String) TEST_F(JSONTypeCastTest, Int) { auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); auto const type = cudf::data_type{cudf::type_id::INT64}; cudf::test::strings_column_wrapper data({"1", "null", "3", "true", "5", "false"}); @@ -141,7 +142,7 @@ TEST_F(JSONTypeCastTest, Int) TEST_F(JSONTypeCastTest, StringEscapes) { auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); auto const type = cudf::data_type{cudf::type_id::STRING}; cudf::test::strings_column_wrapper data({ @@ -183,7 +184,7 @@ TEST_F(JSONTypeCastTest, StringEscapes) TEST_F(JSONTypeCastTest, ErrorNulls) { auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); auto const type = cudf::data_type{cudf::type_id::STRING}; // error in decoding diff --git a/cpp/tests/io/json/json_whitespace_normalization_test.cu b/cpp/tests/io/json/json_whitespace_normalization_test.cu index 01dd17fab98..6d79fdc98ef 100644 --- a/cpp/tests/io/json/json_whitespace_normalization_test.cu +++ b/cpp/tests/io/json/json_whitespace_normalization_test.cu @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -39,12 +40,12 @@ void run_test(std::string const& host_input, std::string const& expected_host_ou auto stream_view = cudf::test::get_default_stream(); auto device_input = rmm::device_buffer( - host_input.c_str(), host_input.size(), stream_view, rmm::mr::get_current_device_resource()); + host_input.c_str(), host_input.size(), stream_view, cudf::get_current_device_resource_ref()); // Preprocessing FST cudf::io::datasource::owning_buffer device_data(std::move(device_input)); cudf::io::json::detail::normalize_whitespace( - device_data, stream_view, rmm::mr::get_current_device_resource()); + device_data, stream_view, cudf::get_current_device_resource_ref()); std::string preprocessed_host_output(device_data.size(), 0); CUDF_CUDA_TRY(cudaMemcpyAsync(preprocessed_host_output.data(), diff --git a/cpp/tests/io/json/nested_json_test.cpp b/cpp/tests/io/json/nested_json_test.cpp index 5dc25133719..327169ae563 100644 --- a/cpp/tests/io/json/nested_json_test.cpp +++ b/cpp/tests/io/json/nested_json_test.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -447,7 +448,7 @@ TEST_F(JsonNewlineDelimiterTest, TokenStream) // Parse the JSON and get the token stream auto [d_tokens_gpu, d_token_indices_gpu] = cuio_json::detail::get_token_stream( - d_input, default_options, stream, rmm::mr::get_current_device_resource()); + d_input, default_options, stream, cudf::get_current_device_resource_ref()); // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); @@ -581,7 +582,7 @@ TEST_F(JsonNewlineDelimiterTest, TokenStream2) // Parse the JSON and get the token stream auto [d_tokens_gpu, d_token_indices_gpu] = cuio_json::detail::get_token_stream( - d_input, default_options, stream, rmm::mr::get_current_device_resource()); + d_input, default_options, stream, cudf::get_current_device_resource_ref()); // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); @@ -639,7 +640,7 @@ TEST_F(JsonParserTest, ExtractColumn) // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); // Default parsing options cudf::io::json_reader_options default_options{}; @@ -648,7 +649,7 @@ TEST_F(JsonParserTest, ExtractColumn) auto const d_input = cudf::detail::make_device_uvector_async( cudf::host_span{input.c_str(), input.size()}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // Get the JSON's tree representation auto const cudf_table = json_parser(d_input, default_options, stream, mr); @@ -739,7 +740,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStream) // Parse the JSON and get the token stream auto [d_tokens_gpu, d_token_indices_gpu] = cuio_json::detail::get_token_stream( - d_input, default_options, stream, rmm::mr::get_current_device_resource()); + d_input, default_options, stream, cudf::get_current_device_resource_ref()); // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); @@ -856,9 +857,9 @@ TEST_F(JsonTest, PostProcessTokenStream) auto const d_offsets = cudf::detail::make_device_uvector_async( cudf::host_span{offsets.data(), offsets.size()}, stream, - rmm::mr::get_current_device_resource()); - auto const d_tokens = - cudf::detail::make_device_uvector_async(tokens, stream, rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); + auto const d_tokens = cudf::detail::make_device_uvector_async( + tokens, stream, cudf::get_current_device_resource_ref()); // Run system-under-test auto [d_filtered_tokens, d_filtered_indices] = @@ -883,7 +884,7 @@ TEST_P(JsonDelimiterParamTest, UTF_JSON) { // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); auto json_parser = cuio_json::detail::device_parse_nested_json; char const delimiter = GetParam(); @@ -904,7 +905,7 @@ TEST_P(JsonDelimiterParamTest, UTF_JSON) auto const d_ascii_pass = cudf::detail::make_device_uvector_sync( cudf::host_span{ascii_pass.c_str(), ascii_pass.size()}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_EXPECT_NO_THROW(json_parser(d_ascii_pass, default_options, stream, mr)); @@ -921,7 +922,7 @@ TEST_P(JsonDelimiterParamTest, UTF_JSON) auto const d_utf_failed = cudf::detail::make_device_uvector_sync( cudf::host_span{utf_failed.c_str(), utf_failed.size()}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_EXPECT_NO_THROW(json_parser(d_utf_failed, default_options, stream, mr)); // utf-8 string that passes parsing. @@ -938,7 +939,7 @@ TEST_P(JsonDelimiterParamTest, UTF_JSON) auto const d_utf_pass = cudf::detail::make_device_uvector_sync( cudf::host_span{utf_pass.c_str(), utf_pass.size()}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_EXPECT_NO_THROW(json_parser(d_utf_pass, default_options, stream, mr)); } @@ -949,7 +950,7 @@ TEST_F(JsonParserTest, ExtractColumnWithQuotes) // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); // Default parsing options cudf::io::json_reader_options options{}; @@ -959,7 +960,7 @@ TEST_F(JsonParserTest, ExtractColumnWithQuotes) auto const d_input = cudf::detail::make_device_uvector_async( cudf::host_span{input.c_str(), input.size()}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // Get the JSON's tree representation auto const cudf_table = json_parser(d_input, options, stream, mr); @@ -982,7 +983,7 @@ TEST_F(JsonParserTest, ExpectFailMixStructAndList) // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); // Default parsing options cudf::io::json_reader_options options{}; @@ -1002,7 +1003,7 @@ TEST_F(JsonParserTest, ExpectFailMixStructAndList) auto const d_input = cudf::detail::make_device_uvector_async( cudf::host_span{input.c_str(), input.size()}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); EXPECT_THROW(auto const cudf_table = json_parser(d_input, options, stream, mr), cudf::logic_error); } @@ -1011,7 +1012,7 @@ TEST_F(JsonParserTest, ExpectFailMixStructAndList) auto const d_input = cudf::detail::make_device_uvector_async( cudf::host_span{input.c_str(), input.size()}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_EXPECT_NO_THROW(auto const cudf_table = json_parser(d_input, options, stream, mr)); } } @@ -1023,7 +1024,7 @@ TEST_F(JsonParserTest, EmptyString) // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); // Default parsing options cudf::io::json_reader_options default_options{}; @@ -1032,7 +1033,7 @@ TEST_F(JsonParserTest, EmptyString) auto const d_input = cudf::detail::make_device_uvector_sync(cudf::host_span{input.c_str(), input.size()}, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // Get the JSON's tree representation auto const cudf_table = json_parser(d_input, default_options, stream, mr); @@ -1177,7 +1178,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStreamNewlineAndDelimiter) // Parse the JSON and get the token stream auto [d_tokens_gpu, d_token_indices_gpu] = cuio_json::detail::get_token_stream( - d_input, default_options, stream, rmm::mr::get_current_device_resource()); + d_input, default_options, stream, cudf::get_current_device_resource_ref()); // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); diff --git a/cpp/tests/io/orc_chunked_reader_test.cu b/cpp/tests/io/orc_chunked_reader_test.cu index 2b78a5e7251..8ad1fea649d 100644 --- a/cpp/tests/io/orc_chunked_reader_test.cu +++ b/cpp/tests/io/orc_chunked_reader_test.cu @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -79,7 +80,7 @@ auto write_file(std::vector>& input_columns, null_count, std::move(col), cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // Shift nulls of the next column by one position, to avoid having all nulls // in the same table rows. @@ -121,7 +122,7 @@ auto chunked_read(std::string const& filepath, // TODO: remove this scope, when we get rid of mem stat in the reader. // This is to avoid use-after-free of memory resource created by the mem stat object. - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); do { auto chunk = reader.read_chunk(); diff --git a/cpp/tests/io/parquet_chunked_reader_test.cu b/cpp/tests/io/parquet_chunked_reader_test.cu index 66b36aeed63..153a8a0c5aa 100644 --- a/cpp/tests/io/parquet_chunked_reader_test.cu +++ b/cpp/tests/io/parquet_chunked_reader_test.cu @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -80,7 +81,7 @@ auto write_file(std::vector>& input_columns, null_count, std::move(col), cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); // Shift nulls of the next column by one position, to avoid having all nulls // in the same table rows. diff --git a/cpp/tests/io/parquet_writer_test.cpp b/cpp/tests/io/parquet_writer_test.cpp index e07ebe25322..c8100038942 100644 --- a/cpp/tests/io/parquet_writer_test.cpp +++ b/cpp/tests/io/parquet_writer_test.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -192,7 +193,7 @@ TEST_F(ParquetWriterTest, BufferSource) cudf::host_span{reinterpret_cast(out_buffer.data()), out_buffer.size()}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto const d_buffer = cudf::device_span( reinterpret_cast(d_input.data()), d_input.size()); cudf::io::parquet_reader_options in_opts = diff --git a/cpp/tests/io/type_inference_test.cu b/cpp/tests/io/type_inference_test.cu index 37156292f44..b20f2024cb9 100644 --- a/cpp/tests/io/type_inference_test.cu +++ b/cpp/tests/io/type_inference_test.cu @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -55,9 +56,9 @@ TEST_F(TypeInference, Basic) auto const string_offset = std::vector{1, 4, 7}; auto const string_length = std::vector{2, 2, 1}; auto const d_string_offset = cudf::detail::make_device_uvector_async( - string_offset, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_offset, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const d_string_length = cudf::detail::make_device_uvector_async( - string_length, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_length, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_col_strings = thrust::make_zip_iterator(thrust::make_tuple(d_string_offset.begin(), d_string_length.begin())); @@ -88,9 +89,9 @@ TEST_F(TypeInference, Null) auto const string_offset = std::vector{1, 1, 4}; auto const string_length = std::vector{0, 2, 1}; auto const d_string_offset = cudf::detail::make_device_uvector_async( - string_offset, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_offset, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const d_string_length = cudf::detail::make_device_uvector_async( - string_length, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_length, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_col_strings = thrust::make_zip_iterator(thrust::make_tuple(d_string_offset.begin(), d_string_length.begin())); @@ -121,9 +122,9 @@ TEST_F(TypeInference, AllNull) auto const string_offset = std::vector{1, 1, 1}; auto const string_length = std::vector{0, 0, 4}; auto const d_string_offset = cudf::detail::make_device_uvector_async( - string_offset, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_offset, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const d_string_length = cudf::detail::make_device_uvector_async( - string_length, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_length, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_col_strings = thrust::make_zip_iterator(thrust::make_tuple(d_string_offset.begin(), d_string_length.begin())); @@ -154,9 +155,9 @@ TEST_F(TypeInference, String) auto const string_offset = std::vector{1, 8, 12}; auto const string_length = std::vector{6, 3, 4}; auto const d_string_offset = cudf::detail::make_device_uvector_async( - string_offset, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_offset, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const d_string_length = cudf::detail::make_device_uvector_async( - string_length, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_length, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_col_strings = thrust::make_zip_iterator(thrust::make_tuple(d_string_offset.begin(), d_string_length.begin())); @@ -187,9 +188,9 @@ TEST_F(TypeInference, Bool) auto const string_offset = std::vector{1, 6, 12}; auto const string_length = std::vector{4, 5, 5}; auto const d_string_offset = cudf::detail::make_device_uvector_async( - string_offset, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_offset, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const d_string_length = cudf::detail::make_device_uvector_async( - string_length, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_length, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_col_strings = thrust::make_zip_iterator(thrust::make_tuple(d_string_offset.begin(), d_string_length.begin())); @@ -220,9 +221,9 @@ TEST_F(TypeInference, Timestamp) auto const string_offset = std::vector{1, 10}; auto const string_length = std::vector{8, 9}; auto const d_string_offset = cudf::detail::make_device_uvector_async( - string_offset, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_offset, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const d_string_length = cudf::detail::make_device_uvector_async( - string_length, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_length, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_col_strings = thrust::make_zip_iterator(thrust::make_tuple(d_string_offset.begin(), d_string_length.begin())); @@ -254,9 +255,9 @@ TEST_F(TypeInference, InvalidInput) auto const string_offset = std::vector{1, 3, 5, 7, 9}; auto const string_length = std::vector{1, 1, 1, 1, 1}; auto const d_string_offset = cudf::detail::make_device_uvector_async( - string_offset, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_offset, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const d_string_length = cudf::detail::make_device_uvector_async( - string_length, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + string_length, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_col_strings = thrust::make_zip_iterator(thrust::make_tuple(d_string_offset.begin(), d_string_length.begin())); diff --git a/cpp/tests/iterator/iterator_tests.cuh b/cpp/tests/iterator/iterator_tests.cuh index c6da6b75930..5c9f6114eb5 100644 --- a/cpp/tests/iterator/iterator_tests.cuh +++ b/cpp/tests/iterator/iterator_tests.cuh @@ -22,6 +22,7 @@ #include // for meanvar #include #include +#include #include #include @@ -87,7 +88,7 @@ struct IteratorTest : public cudf::test::BaseFixture { InputIterator d_in_last = d_in + num_items; EXPECT_EQ(thrust::distance(d_in, d_in_last), num_items); auto dev_expected = cudf::detail::make_device_uvector_sync( - expected, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + expected, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); // using a temporary vector and calling transform and all_of separately is // equivalent to thrust::equal but compiles ~3x faster diff --git a/cpp/tests/iterator/value_iterator_test.cuh b/cpp/tests/iterator/value_iterator_test.cuh index 8252ce88f39..a479a263b09 100644 --- a/cpp/tests/iterator/value_iterator_test.cuh +++ b/cpp/tests/iterator/value_iterator_test.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-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. @@ -17,6 +17,7 @@ #include #include +#include #include @@ -26,7 +27,7 @@ void non_null_iterator(IteratorTest& testFixture) { auto host_array = cudf::test::make_type_param_vector({0, 6, 0, -14, 13, 64, -13, -20, 45}); auto dev_array = cudf::detail::make_device_uvector_sync( - host_array, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + host_array, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); // calculate the expected value by CPU. thrust::host_vector replaced_array(host_array); diff --git a/cpp/tests/iterator/value_iterator_test_strings.cu b/cpp/tests/iterator/value_iterator_test_strings.cu index 10bb3f21ee1..a965c65aef0 100644 --- a/cpp/tests/iterator/value_iterator_test_strings.cu +++ b/cpp/tests/iterator/value_iterator_test_strings.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-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. @@ -15,6 +15,7 @@ #include "iterator_tests.cuh" #include +#include #include #include @@ -31,7 +32,7 @@ auto strings_to_string_views(std::vector& input_strings) std::tie(chars, offsets) = cudf::test::detail::make_chars_and_offsets( input_strings.begin(), input_strings.end(), all_valid); auto dev_chars = cudf::detail::make_device_uvector_sync( - chars, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + chars, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); // calculate the expected value by CPU. (but contains device pointers) thrust::host_vector replaced_array(input_strings.size()); @@ -52,7 +53,7 @@ TEST_F(StringIteratorTest, string_view_null_iterator) std::string zero("zero"); // the char data has to be in GPU auto initmsg = cudf::detail::make_device_uvector_sync( - zero, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + zero, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); T init = T{initmsg.data(), int(initmsg.size())}; // data and valid arrays @@ -88,7 +89,7 @@ TEST_F(StringIteratorTest, string_view_no_null_iterator) std::string zero("zero"); // the char data has to be in GPU auto initmsg = cudf::detail::make_device_uvector_sync( - zero, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + zero, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); T init = T{initmsg.data(), int(initmsg.size())}; // data array @@ -113,7 +114,7 @@ TEST_F(StringIteratorTest, string_scalar_iterator) std::string zero("zero"); // the char data has to be in GPU auto initmsg = cudf::detail::make_device_uvector_sync( - zero, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + zero, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); T init = T{initmsg.data(), int(initmsg.size())}; // data array diff --git a/cpp/tests/join/distinct_join_tests.cpp b/cpp/tests/join/distinct_join_tests.cpp index 05ae4ea1d04..93754091b3f 100644 --- a/cpp/tests/join/distinct_join_tests.cpp +++ b/cpp/tests/join/distinct_join_tests.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -44,7 +45,7 @@ std::unique_ptr> get_left_indices(cudf::siz auto sequence = std::vector(size); std::iota(sequence.begin(), sequence.end(), 0); auto indices = cudf::detail::make_device_uvector_sync( - sequence, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + sequence, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); return std::make_unique>(std::move(indices)); } diff --git a/cpp/tests/join/join_tests.cpp b/cpp/tests/join/join_tests.cpp index 4e88414d553..ab387a5c7f5 100644 --- a/cpp/tests/join/join_tests.cpp +++ b/cpp/tests/join/join_tests.cpp @@ -37,8 +37,7 @@ #include #include #include - -#include +#include #include @@ -69,7 +68,7 @@ std::unique_ptr join_and_gather( std::vector const& left_on, std::vector const& right_on, cudf::null_equality compare_nulls, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto left_selected = left_input.select(left_on); auto right_selected = right_input.select(right_on); @@ -2028,7 +2027,7 @@ struct JoinTestLists : public cudf::test::BaseFixture { auto const probe_tv = cudf::table_view{{probe}}; auto const [left_result_map, right_result_map] = - join_func(build_tv, probe_tv, nulls_equal, rmm::mr::get_current_device_resource()); + join_func(build_tv, probe_tv, nulls_equal, cudf::get_current_device_resource_ref()); auto const left_result_table = sort_and_gather(build_tv, column_view_from_device_uvector(*left_result_map), oob_policy); diff --git a/cpp/tests/join/semi_anti_join_tests.cpp b/cpp/tests/join/semi_anti_join_tests.cpp index de3d8bdaa23..3e279260b99 100644 --- a/cpp/tests/join/semi_anti_join_tests.cpp +++ b/cpp/tests/join/semi_anti_join_tests.cpp @@ -28,8 +28,7 @@ #include #include #include - -#include +#include #include @@ -59,7 +58,7 @@ std::unique_ptr join_and_gather( std::vector const& left_on, std::vector const& right_on, cudf::null_equality compare_nulls, - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { auto left_selected = left_input.select(left_on); auto right_selected = right_input.select(right_on); diff --git a/cpp/tests/large_strings/json_tests.cu b/cpp/tests/large_strings/json_tests.cu index e34ab991c11..80bde168b75 100644 --- a/cpp/tests/large_strings/json_tests.cu +++ b/cpp/tests/large_strings/json_tests.cu @@ -22,6 +22,7 @@ #include #include #include +#include #include struct JsonLargeReaderTest : public cudf::test::StringsLargeTest {}; @@ -81,7 +82,7 @@ TEST_F(JsonLargeReaderTest, MultiBatch) json_lines_options, chunk_size, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto table_views = std::vector(tables.size()); std::transform(tables.begin(), tables.end(), table_views.begin(), [](auto& table) { diff --git a/cpp/tests/large_strings/large_strings_fixture.cpp b/cpp/tests/large_strings/large_strings_fixture.cpp index ac8159369a1..249319da7f7 100644 --- a/cpp/tests/large_strings/large_strings_fixture.cpp +++ b/cpp/tests/large_strings/large_strings_fixture.cpp @@ -126,7 +126,7 @@ int main(int argc, char** argv) auto const cmd_opts = parse_cudf_test_opts(argc, argv); // hardcoding the CUDA memory resource to keep from exceeding the pool auto mr = cudf::test::make_cuda(); - rmm::mr::set_current_device_resource(mr.get()); + cudf::set_current_device_resource(mr.get()); auto adaptor = make_stream_mode_adaptor(cmd_opts); // create object to automatically be destroyed at the end of main() diff --git a/cpp/tests/partitioning/hash_partition_test.cpp b/cpp/tests/partitioning/hash_partition_test.cpp index 24dadf9b520..579d918a31d 100644 --- a/cpp/tests/partitioning/hash_partition_test.cpp +++ b/cpp/tests/partitioning/hash_partition_test.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -290,7 +291,7 @@ void run_fixed_width_test(size_t cols, // Make a table view of the partition numbers constexpr cudf::data_type dtype{cudf::type_id::INT32}; auto d_partitions = cudf::detail::make_device_uvector_sync( - partitions, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + partitions, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); cudf::column_view partitions_col(dtype, rows, d_partitions.data(), nullptr, 0); cudf::table_view partitions_table({partitions_col}); diff --git a/cpp/tests/quantiles/percentile_approx_test.cpp b/cpp/tests/quantiles/percentile_approx_test.cpp index 06c6b9dfbe4..915717713df 100644 --- a/cpp/tests/quantiles/percentile_approx_test.cpp +++ b/cpp/tests/quantiles/percentile_approx_test.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -371,7 +372,7 @@ struct PercentileApproxTest : public cudf::test::BaseFixture {}; TEST_F(PercentileApproxTest, EmptyInput) { auto empty_ = cudf::tdigest::detail::make_empty_tdigest_column( - cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + cudf::get_default_stream(), cudf::get_current_device_resource_ref()); cudf::test::fixed_width_column_wrapper percentiles{0.0, 0.25, 0.3}; std::vector input; diff --git a/cpp/tests/reductions/segmented_reduction_tests.cpp b/cpp/tests/reductions/segmented_reduction_tests.cpp index 668690639a6..19996f827cf 100644 --- a/cpp/tests/reductions/segmented_reduction_tests.cpp +++ b/cpp/tests/reductions/segmented_reduction_tests.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -49,7 +50,7 @@ TYPED_TEST(SegmentedReductionTest, SumExcludeNulls) {1, 2, 3, 1, XXX, 3, 1, XXX, XXX, XXX}, {1, 1, 1, 1, 0, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{6, 4, 1, XXX, XXX, XXX}, {1, 1, 1, 0, 0, 0}}; @@ -97,7 +98,7 @@ TYPED_TEST(SegmentedReductionTest, ProductExcludeNulls) {1, 3, 5, XXX, 3, 5, 1, XXX, XXX, XXX}, {1, 1, 1, 0, 1, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{15, 15, 1, XXX, XXX, XXX}, {1, 1, 1, 0, 0, 0}}; @@ -147,7 +148,7 @@ TYPED_TEST(SegmentedReductionTest, MaxExcludeNulls) {1, 2, 3, 1, XXX, 3, 1, XXX, XXX, XXX}, {1, 1, 1, 1, 0, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{3, 3, 1, XXX, XXX, XXX}, {1, 1, 1, 0, 0, 0}}; @@ -195,7 +196,7 @@ TYPED_TEST(SegmentedReductionTest, MinExcludeNulls) {1, 2, 3, 1, XXX, 3, 1, XXX, XXX, XXX}, {1, 1, 1, 1, 0, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{1, 1, 1, XXX, XXX, XXX}, {1, 1, 1, 0, 0, 0}}; @@ -244,7 +245,7 @@ TYPED_TEST(SegmentedReductionTest, AnyExcludeNulls) {1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 9, 12, 12, 13, 14, 15, 17}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{ {false, false, true, true, bool{XXX}, false, true, bool{XXX}, bool{XXX}}, {true, true, true, true, false, true, true, false, false}}; @@ -284,7 +285,7 @@ TYPED_TEST(SegmentedReductionTest, AllExcludeNulls) {1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1}}; auto const offsets = std::vector{0, 3, 6, 6, 7, 8, 10, 13, 16, 17}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{ {true, true, bool{XXX}, true, bool{XXX}, bool{XXX}, false, false, false}, {true, true, false, true, false, false, true, true, true}}; @@ -335,7 +336,7 @@ TYPED_TEST(SegmentedReductionTest, SumIncludeNulls) {1, 2, 3, 1, XXX, 3, 1, XXX, XXX, XXX}, {1, 1, 1, 1, 0, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{6, XXX, 1, XXX, XXX, XXX}, {1, 0, 1, 0, 0, 0}}; @@ -386,7 +387,7 @@ TYPED_TEST(SegmentedReductionTest, ProductIncludeNulls) {1, 3, 5, XXX, 3, 5, 1, XXX, XXX, XXX}, {1, 1, 1, 0, 1, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{15, XXX, 1, XXX, XXX, XXX}, {1, 0, 1, 0, 0, 0}}; @@ -439,7 +440,7 @@ TYPED_TEST(SegmentedReductionTest, MaxIncludeNulls) {1, 2, 3, 1, XXX, 3, 1, XXX, XXX, XXX}, {1, 1, 1, 1, 0, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{3, XXX, 1, XXX, XXX, XXX}, {1, 0, 1, 0, 0, 0}}; @@ -490,7 +491,7 @@ TYPED_TEST(SegmentedReductionTest, MinIncludeNulls) {1, 2, 3, 1, XXX, 3, 1, XXX, XXX, XXX}, {1, 1, 1, 1, 0, 1, 1, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{1, XXX, 1, XXX, XXX, XXX}, {1, 0, 1, 0, 0, 0}}; @@ -542,7 +543,7 @@ TYPED_TEST(SegmentedReductionTest, AnyIncludeNulls) {1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0}}; auto const offsets = std::vector{0, 3, 6, 9, 12, 12, 13, 14, 15, 17}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{ {false, bool{XXX}, true, bool{XXX}, bool{XXX}, false, true, bool{XXX}, bool{XXX}}, {true, false, true, false, false, true, true, false, false}}; @@ -605,7 +606,7 @@ TYPED_TEST(SegmentedReductionTest, AllIncludeNulls) {1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1}}; auto const offsets = std::vector{0, 3, 6, 6, 7, 8, 10, 13, 16, 17}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{ {true, bool{XXX}, bool{XXX}, true, bool{XXX}, bool{XXX}, false, bool{XXX}, false}, {true, false, false, true, false, false, true, false, true}}; @@ -670,7 +671,7 @@ TEST_F(SegmentedReductionTestUntyped, PartialSegmentReduction) {1, 2, 3, 4, 5, 6, 7}, {true, true, true, true, true, true, true}}; auto const offsets = std::vector{1, 3, 4}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{5, 4}, {true, true}}; auto res = @@ -721,7 +722,7 @@ TEST_F(SegmentedReductionTestUntyped, NonNullableInput) auto const input = cudf::test::fixed_width_column_wrapper{1, 2, 3, 4, 5, 6, 7}; auto const offsets = std::vector{0, 1, 1, 3, 7}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{{1, XXX, 5, 22}, {true, false, true, true}}; @@ -767,7 +768,7 @@ TEST_F(SegmentedReductionTestUntyped, Mean) cudf::test::fixed_width_column_wrapper{10, 20, 30, 40, 50, 60, 70, 80, 90}; auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_mean_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::FLOAT32}; @@ -786,7 +787,7 @@ TEST_F(SegmentedReductionTestUntyped, MeanNulls) {10, 20, 30, 40, 50, 60, 0, 80, 90}, {true, true, true, true, true, true, false, true, true}); auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_mean_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::FLOAT64}; @@ -808,7 +809,7 @@ TEST_F(SegmentedReductionTestUntyped, SumOfSquares) cudf::test::fixed_width_column_wrapper{10, 20, 30, 40, 50, 60, 70, 80, 90}; auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_sum_of_squares_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::INT32}; @@ -828,7 +829,7 @@ TEST_F(SegmentedReductionTestUntyped, SumOfSquaresNulls) {10, 20, 30, 40, 50, 60, 0, 80, 90}, {true, true, true, true, true, true, false, true, true}); auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_sum_of_squares_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::INT64}; @@ -851,7 +852,7 @@ TEST_F(SegmentedReductionTestUntyped, StandardDeviation) cudf::test::fixed_width_column_wrapper{10, 20, 30, 40, 50, 60, 70, 80, 90}; auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_std_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::FLOAT32}; @@ -871,7 +872,7 @@ TEST_F(SegmentedReductionTestUntyped, StandardDeviationNulls) {10, 0, 20, 30, 54, 63, 0, 72, 81}, {true, false, true, true, true, true, false, true, true}); auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_std_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::FLOAT64}; @@ -894,7 +895,7 @@ TEST_F(SegmentedReductionTestUntyped, Variance) cudf::test::fixed_width_column_wrapper{10, 20, 30, 40, 50, 60, 70, 80, 90}; auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_variance_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::FLOAT32}; @@ -914,7 +915,7 @@ TEST_F(SegmentedReductionTestUntyped, VarianceNulls) {10, 0, 20, 30, 54, 63, 0, 72, 81}, {true, false, true, true, true, true, false, true, true}); auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_variance_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::FLOAT64}; @@ -936,7 +937,7 @@ TEST_F(SegmentedReductionTestUntyped, NUnique) cudf::test::fixed_width_column_wrapper({10, 15, 20, 30, 60, 60, 70, 70, 80}); auto const offsets = std::vector{0, 1, 1, 2, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_nunique_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::INT32}; @@ -956,7 +957,7 @@ TEST_F(SegmentedReductionTestUntyped, NUniqueNulls) {10, 0, 20, 30, 60, 60, 70, 70, 0}, {true, false, true, true, true, true, true, true, false}); auto const offsets = std::vector{0, 1, 1, 2, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_nunique_aggregation(); auto const output_type = cudf::data_type{cudf::type_id::INT32}; @@ -978,7 +979,7 @@ TEST_F(SegmentedReductionTestUntyped, Errors) {10, 0, 20, 30, 54, 63, 0, 72, 81}, {true, false, true, true, true, true, false, true, true}); auto const offsets = std::vector{0, 1, 1, 4, 9}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const null_policy = cudf::null_policy::EXCLUDE; auto const output_type = cudf::data_type{cudf::type_id::TIMESTAMP_DAYS}; auto const str_input = @@ -1047,7 +1048,7 @@ TEST_F(SegmentedReductionTestUntyped, ReduceEmptyColumn) auto const input = cudf::test::fixed_width_column_wrapper{}; auto const offsets = std::vector{0}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{}; auto res = @@ -1084,7 +1085,7 @@ TEST_F(SegmentedReductionTestUntyped, EmptyInputWithOffsets) auto const input = cudf::test::fixed_width_column_wrapper{}; auto const offsets = std::vector{0, 0, 0, 0, 0, 0}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::fixed_width_column_wrapper{ {XXX, XXX, XXX, XXX, XXX}, {false, false, false, false, false}}; @@ -1133,7 +1134,7 @@ TYPED_TEST(SegmentedReductionFixedPointTest, MaxWithNulls) auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_max_aggregation(); for (auto scale : {-2, 0, 5}) { @@ -1161,7 +1162,7 @@ TYPED_TEST(SegmentedReductionFixedPointTest, MinWithNulls) auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_min_aggregation(); for (auto scale : {-2, 0, 5}) { @@ -1189,7 +1190,7 @@ TYPED_TEST(SegmentedReductionFixedPointTest, MaxNonNullableInput) auto const offsets = std::vector{0, 3, 4, 4}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_max_aggregation(); for (auto scale : {-2, 0, 5}) { @@ -1214,7 +1215,7 @@ TYPED_TEST(SegmentedReductionFixedPointTest, MinNonNullableInput) auto const offsets = std::vector{0, 3, 4, 4}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_min_aggregation(); for (auto scale : {-2, 0, 5}) { @@ -1239,7 +1240,7 @@ TYPED_TEST(SegmentedReductionFixedPointTest, Sum) auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_sum_aggregation(); for (auto scale : {-2, 0, 5}) { @@ -1277,7 +1278,7 @@ TYPED_TEST(SegmentedReductionFixedPointTest, Product) auto const offsets = std::vector{0, 3, 6, 7, 8, 12, 12}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_product_aggregation(); for (auto scale : {-2, 0, 5}) { @@ -1314,7 +1315,7 @@ TYPED_TEST(SegmentedReductionFixedPointTest, SumOfSquares) auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const agg = cudf::make_sum_of_squares_aggregation(); for (auto scale : {-2, 0, 5}) { @@ -1478,7 +1479,7 @@ TEST_F(SegmentedReductionStringTest, EmptyInputWithOffsets) auto const input = cudf::test::strings_column_wrapper{}; auto const offsets = std::vector{0, 0, 0, 0}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto const expect = cudf::test::strings_column_wrapper({XXX, XXX, XXX}, {false, false, false}); auto result = diff --git a/cpp/tests/scalar/scalar_device_view_test.cu b/cpp/tests/scalar/scalar_device_view_test.cu index 5026954403b..2232aefefcd 100644 --- a/cpp/tests/scalar/scalar_device_view_test.cu +++ b/cpp/tests/scalar/scalar_device_view_test.cu @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -131,7 +132,7 @@ TEST_F(StringScalarDeviceViewTest, Value) auto scalar_device_view = cudf::get_scalar_device_view(s); rmm::device_scalar result{cudf::get_default_stream()}; auto value_v = cudf::detail::make_device_uvector_sync( - value, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + value, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); test_string_value<<<1, 1, 0, cudf::get_default_stream().value()>>>( scalar_device_view, value_v.data(), value.size(), result.data()); diff --git a/cpp/tests/sort/segmented_sort_tests.cpp b/cpp/tests/sort/segmented_sort_tests.cpp index f4fe2c5956a..79421a1fa30 100644 --- a/cpp/tests/sort/segmented_sort_tests.cpp +++ b/cpp/tests/sort/segmented_sort_tests.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -350,7 +351,7 @@ TEST_F(SegmentedSortInt, UnbalancedOffsets) std::fill_n(h_input.begin(), 4, 0); std::fill(h_input.begin() + 3533, h_input.end(), 10000); auto d_input = cudf::detail::make_device_uvector_sync( - h_input, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + h_input, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto input = cudf::column_view(cudf::device_span(d_input)); auto segments = cudf::test::fixed_width_column_wrapper({0, 4, 3533, 3535}); // full sort should match handcrafted input data here diff --git a/cpp/tests/streams/reduction_test.cpp b/cpp/tests/streams/reduction_test.cpp index e6438ac2834..b4f013fc960 100644 --- a/cpp/tests/streams/reduction_test.cpp +++ b/cpp/tests/streams/reduction_test.cpp @@ -23,6 +23,7 @@ #include #include #include +#include class ReductionTest : public cudf::test::BaseFixture {}; @@ -53,7 +54,7 @@ TEST_F(ReductionTest, SegmentedReductionSum) {true, true, true, true, false, true, true, false, false, false}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()); auto res = cudf::segmented_reduce(input, @@ -71,7 +72,7 @@ TEST_F(ReductionTest, SegmentedReductionSumScalarInit) {true, true, true, true, false, true, true, false, false, false}}; auto const offsets = std::vector{0, 3, 6, 7, 8, 10, 10}; auto const d_offsets = cudf::detail::make_device_uvector_async( - offsets, cudf::test::get_default_stream(), rmm::mr::get_current_device_resource()); + offsets, cudf::test::get_default_stream(), cudf::get_current_device_resource_ref()); auto const init_scalar = cudf::make_fixed_width_scalar(3, cudf::test::get_default_stream()); auto res = cudf::segmented_reduce(input, diff --git a/cpp/tests/strings/contains_tests.cpp b/cpp/tests/strings/contains_tests.cpp index 59423d5b927..c816316d0ff 100644 --- a/cpp/tests/strings/contains_tests.cpp +++ b/cpp/tests/strings/contains_tests.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -298,10 +299,10 @@ TEST_F(StringsContainsTests, HexTest) {thrust::make_counting_iterator(0), thrust::make_counting_iterator(0) + count + 1}); auto d_chars = cudf::detail::make_device_uvector_sync( - ascii_chars, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + ascii_chars, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_offsets = std::make_unique( cudf::detail::make_device_uvector_sync( - offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()), + offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()), rmm::device_buffer{}, 0); auto input = cudf::make_strings_column(count, std::move(d_offsets), d_chars.release(), 0, {}); diff --git a/cpp/tests/strings/factories_test.cu b/cpp/tests/strings/factories_test.cu index 35d648f16e0..90054e41d36 100644 --- a/cpp/tests/strings/factories_test.cu +++ b/cpp/tests/strings/factories_test.cu @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -79,7 +80,7 @@ TEST_F(StringsFactoriesTest, CreateColumnFromPair) h_offsets[idx + 1] = offset; } auto d_strings = cudf::detail::make_device_uvector_sync( - strings, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + strings, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); CUDF_CUDA_TRY(cudaMemcpy(d_buffer.data(), h_buffer.data(), memsize, cudaMemcpyDefault)); auto column = cudf::make_strings_column(d_strings); EXPECT_EQ(column->type(), cudf::data_type{cudf::type_id::STRING}); @@ -140,14 +141,14 @@ TEST_F(StringsFactoriesTest, CreateColumnFromOffsets) std::vector h_nulls{h_null_mask}; auto d_buffer = cudf::detail::make_device_uvector_sync( - h_buffer, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + h_buffer, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_offsets = std::make_unique( cudf::detail::make_device_uvector_sync( - h_offsets, cudf::get_default_stream(), rmm::mr::get_current_device_resource()), + h_offsets, cudf::get_default_stream(), cudf::get_current_device_resource_ref()), rmm::device_buffer{}, 0); auto d_nulls = cudf::detail::make_device_uvector_sync( - h_nulls, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + h_nulls, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto column = cudf::make_strings_column( count, std::move(d_offsets), d_buffer.release(), null_count, d_nulls.release()); EXPECT_EQ(column->type(), cudf::data_type{cudf::type_id::STRING}); @@ -191,7 +192,7 @@ TEST_F(StringsFactoriesTest, EmptyStringsColumn) auto d_chars = rmm::device_uvector(0, cudf::get_default_stream()); auto d_offsets = std::make_unique( cudf::detail::make_zeroed_device_uvector_sync( - 1, cudf::get_default_stream(), rmm::mr::get_current_device_resource()), + 1, cudf::get_default_stream(), cudf::get_current_device_resource_ref()), rmm::device_buffer{}, 0); rmm::device_uvector d_nulls{0, cudf::get_default_stream()}; diff --git a/cpp/tests/strings/integers_tests.cpp b/cpp/tests/strings/integers_tests.cpp index 7a038fa6d75..ce5f68de3c9 100644 --- a/cpp/tests/strings/integers_tests.cpp +++ b/cpp/tests/strings/integers_tests.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -295,7 +296,7 @@ TYPED_TEST(StringsIntegerConvertTest, FromToInteger) h_integers.push_back(std::numeric_limits::min()); h_integers.push_back(std::numeric_limits::max()); auto const d_integers = cudf::detail::make_device_uvector_sync( - h_integers, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + h_integers, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto integers = cudf::make_numeric_column(cudf::data_type{cudf::type_to_id()}, (cudf::size_type)d_integers.size()); auto integers_view = integers->mutable_view(); diff --git a/cpp/tests/structs/utilities_tests.cpp b/cpp/tests/structs/utilities_tests.cpp index e5ff700a242..c33eedf9bd9 100644 --- a/cpp/tests/structs/utilities_tests.cpp +++ b/cpp/tests/structs/utilities_tests.cpp @@ -30,6 +30,7 @@ #include #include #include +#include template using nums = cudf::test::fixed_width_column_wrapper; @@ -60,7 +61,7 @@ TYPED_TEST(TypedStructUtilitiesTest, ListsAtTopLevel) {}, cudf::structs::detail::column_nullability::FORCE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_TABLES_EQUAL(table, flattened_table->flattened_columns()); } @@ -82,7 +83,7 @@ TYPED_TEST(TypedStructUtilitiesTest, NoStructs) {}, cudf::structs::detail::column_nullability::FORCE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_TABLES_EQUAL(table, flattened_table->flattened_columns()); } @@ -114,7 +115,7 @@ TYPED_TEST(TypedStructUtilitiesTest, SingleLevelStruct) {}, cudf::structs::detail::column_nullability::FORCE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_TABLES_EQUAL(expected, flattened_table->flattened_columns()); } @@ -147,7 +148,7 @@ TYPED_TEST(TypedStructUtilitiesTest, SingleLevelStructWithNulls) {}, cudf::structs::detail::column_nullability::FORCE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_TABLES_EQUAL(expected, flattened_table->flattened_columns()); } @@ -196,7 +197,7 @@ TYPED_TEST(TypedStructUtilitiesTest, StructOfStruct) {}, cudf::structs::detail::column_nullability::FORCE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_TABLES_EQUAL(expected, flattened_table->flattened_columns()); } @@ -246,7 +247,7 @@ TYPED_TEST(TypedStructUtilitiesTest, StructOfStructWithNullsAtLeafLevel) {}, cudf::structs::detail::column_nullability::FORCE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_TABLES_EQUAL(expected, flattened_table->flattened_columns()); } @@ -297,7 +298,7 @@ TYPED_TEST(TypedStructUtilitiesTest, StructOfStructWithNullsAtTopLevel) {}, cudf::structs::detail::column_nullability::FORCE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_TABLES_EQUAL(expected, flattened_table->flattened_columns()); } @@ -348,7 +349,7 @@ TYPED_TEST(TypedStructUtilitiesTest, StructOfStructWithNullsAtAllLevels) {}, cudf::structs::detail::column_nullability::FORCE, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_TABLES_EQUAL(expected, flattened_table->flattened_columns()); } @@ -363,7 +364,7 @@ void test_non_struct_columns(cudf::column_view const& input) { // push_down_nulls() on non-struct columns should return the input column, unchanged. auto [superimposed, backing_data] = cudf::structs::detail::push_down_nulls( - input, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + input, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(input, superimposed); EXPECT_TRUE(backing_data.new_null_masks.empty()); @@ -427,7 +428,7 @@ TYPED_TEST(TypedSuperimposeTest, BasicStruct) make_lists_member(cudf::test::iterators::nulls_at({4, 5}))); auto [output, backing_data] = cudf::structs::detail::push_down_nulls( - structs_view, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + structs_view, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); // After push_down_nulls(), the struct nulls (i.e. at index-0) should have been pushed // down to the children. All members should have nulls at row-index 0. @@ -453,7 +454,7 @@ TYPED_TEST(TypedSuperimposeTest, NonNullableParentStruct) .release(); auto [output, backing_data] = cudf::structs::detail::push_down_nulls( - structs_input->view(), cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + structs_input->view(), cudf::get_default_stream(), cudf::get_current_device_resource_ref()); // After push_down_nulls(), none of the child structs should have changed, // because the parent had no nulls to begin with. @@ -487,8 +488,10 @@ TYPED_TEST(TypedSuperimposeTest, NestedStruct_ChildNullable_ParentNonNullable) auto structs_of_structs = cudf::test::structs_column_wrapper{std::move(outer_struct_members)}.release(); - auto [output, backing_data] = cudf::structs::detail::push_down_nulls( - structs_of_structs->view(), cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + auto [output, backing_data] = + cudf::structs::detail::push_down_nulls(structs_of_structs->view(), + cudf::get_default_stream(), + cudf::get_current_device_resource_ref()); // After push_down_nulls(), outer-struct column should not have pushed nulls to child // structs. But the child struct column must push its nulls to its own children. @@ -530,8 +533,10 @@ TYPED_TEST(TypedSuperimposeTest, NestedStruct_ChildNullable_ParentNullable) cudf::detail::set_null_mask( structs_of_structs_view.null_mask(), 1, 2, false, cudf::get_default_stream()); - auto [output, backing_data] = cudf::structs::detail::push_down_nulls( - structs_of_structs->view(), cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + auto [output, backing_data] = + cudf::structs::detail::push_down_nulls(structs_of_structs->view(), + cudf::get_default_stream(), + cudf::get_current_device_resource_ref()); // After push_down_nulls(), outer-struct column should not have pushed nulls to child // structs. But the child struct column must push its nulls to its own children. @@ -587,7 +592,7 @@ TYPED_TEST(TypedSuperimposeTest, Struct_Sliced) // lists_member: 00111 auto [output, backing_data] = cudf::structs::detail::push_down_nulls( - sliced_structs, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + sliced_structs, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); // After push_down_nulls(), the null masks should be: // STRUCT: 11110 @@ -640,7 +645,7 @@ TYPED_TEST(TypedSuperimposeTest, NestedStruct_Sliced) // lists_member: 00110 auto [output, backing_data] = cudf::structs::detail::push_down_nulls( - sliced_structs, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + sliced_structs, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); // After push_down_nulls(), the null masks will be: // STRUCT: 11101 diff --git a/cpp/tests/table/table_view_tests.cu b/cpp/tests/table/table_view_tests.cu index 77b3c6c475c..a393c655fbb 100644 --- a/cpp/tests/table/table_view_tests.cu +++ b/cpp/tests/table/table_view_tests.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023, NVIDIA CORPORATION. + * Copyright (c) 2019-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. @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -47,7 +48,7 @@ void row_comparison(cudf::table_view input1, auto device_table_1 = cudf::table_device_view::create(input1, stream); auto device_table_2 = cudf::table_device_view::create(input2, stream); auto d_column_order = cudf::detail::make_device_uvector_sync( - column_order, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + column_order, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto comparator = cudf::row_lexicographic_comparator( cudf::nullate::NO{}, *device_table_1, *device_table_2, d_column_order.data()); diff --git a/cpp/tests/types/type_dispatcher_test.cu b/cpp/tests/types/type_dispatcher_test.cu index 21e56de4621..f18e9afc09c 100644 --- a/cpp/tests/types/type_dispatcher_test.cu +++ b/cpp/tests/types/type_dispatcher_test.cu @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -70,7 +71,7 @@ CUDF_KERNEL void dispatch_test_kernel(cudf::type_id id, bool* d_result) TYPED_TEST(TypedDispatcherTest, DeviceDispatch) { auto result = cudf::detail::make_zeroed_device_uvector_sync( - 1, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + 1, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); dispatch_test_kernel<<<1, 1, 0, cudf::get_default_stream().value()>>>( cudf::type_to_id(), result.data()); CUDF_CUDA_TRY(cudaDeviceSynchronize()); @@ -131,7 +132,7 @@ CUDF_KERNEL void double_dispatch_test_kernel(cudf::type_id id1, cudf::type_id id TYPED_TEST(TypedDoubleDispatcherTest, DeviceDoubleDispatch) { auto result = cudf::detail::make_zeroed_device_uvector_sync( - 1, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + 1, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); double_dispatch_test_kernel<<<1, 1, 0, cudf::get_default_stream().value()>>>( cudf::type_to_id(), cudf::type_to_id(), result.data()); CUDF_CUDA_TRY(cudaDeviceSynchronize()); diff --git a/cpp/tests/utilities/tdigest_utilities.cu b/cpp/tests/utilities/tdigest_utilities.cu index ec3ea0d9a83..233a307cde4 100644 --- a/cpp/tests/utilities/tdigest_utilities.cu +++ b/cpp/tests/utilities/tdigest_utilities.cu @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -65,11 +66,11 @@ void tdigest_sample_compare(cudf::tdigest::tdigest_column_view const& tdv, } auto d_expected_src = cudf::detail::make_device_uvector_async( - h_expected_src, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + h_expected_src, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_expected_mean = cudf::detail::make_device_uvector_async( - h_expected_mean, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + h_expected_mean, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_expected_weight = cudf::detail::make_device_uvector_async( - h_expected_weight, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + h_expected_weight, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto iter = thrust::make_counting_iterator(0); thrust::for_each( diff --git a/cpp/tests/utilities_tests/batched_memset_tests.cu b/cpp/tests/utilities_tests/batched_memset_tests.cu index 9fc5baeec97..bed0f40d70e 100644 --- a/cpp/tests/utilities_tests/batched_memset_tests.cu +++ b/cpp/tests/utilities_tests/batched_memset_tests.cu @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -41,7 +42,7 @@ TEST(MultiBufferTestIntegral, BasicTest1) // Device init auto stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); + auto mr = cudf::get_current_device_resource_ref(); // Creating base vector for data and setting it to all 0xFF std::vector> expected; diff --git a/cpp/tests/utilities_tests/pinned_memory_tests.cpp b/cpp/tests/utilities_tests/pinned_memory_tests.cpp index 93259fd63ee..ae7c6fa8b8c 100644 --- a/cpp/tests/utilities_tests/pinned_memory_tests.cpp +++ b/cpp/tests/utilities_tests/pinned_memory_tests.cpp @@ -25,7 +25,6 @@ #include #include -#include class PinnedMemoryTest : public cudf::test::BaseFixture { size_t prev_copy_threshold; diff --git a/cpp/tests/utilities_tests/span_tests.cu b/cpp/tests/utilities_tests/span_tests.cu index 30496728083..019d6adc007 100644 --- a/cpp/tests/utilities_tests/span_tests.cu +++ b/cpp/tests/utilities_tests/span_tests.cu @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -253,7 +254,7 @@ CUDF_KERNEL void simple_device_kernel(device_span result) { result[0] = tr TEST(SpanTest, CanUseDeviceSpan) { auto d_message = cudf::detail::make_zeroed_device_uvector_async( - 1, cudf::get_default_stream(), rmm::mr::get_current_device_resource()); + 1, cudf::get_default_stream(), cudf::get_current_device_resource_ref()); auto d_span = device_span(d_message.data(), d_message.size()); diff --git a/docs/cudf/source/libcudf_docs/api_docs/index.rst b/docs/cudf/source/libcudf_docs/api_docs/index.rst index c077a7cd452..96ff0eb7850 100644 --- a/docs/cudf/source/libcudf_docs/api_docs/index.rst +++ b/docs/cudf/source/libcudf_docs/api_docs/index.rst @@ -7,6 +7,7 @@ libcudf documentation cudf_namespace default_stream + memory_resource cudf_classes column_apis datetime_apis diff --git a/docs/cudf/source/libcudf_docs/api_docs/memory_resource.rst b/docs/cudf/source/libcudf_docs/api_docs/memory_resource.rst new file mode 100644 index 00000000000..e32f8a9beb0 --- /dev/null +++ b/docs/cudf/source/libcudf_docs/api_docs/memory_resource.rst @@ -0,0 +1,5 @@ +Memory Resource Management +========================== + +.. doxygengroup:: memory_resource + :members: diff --git a/java/src/main/native/include/maps_column_view.hpp b/java/src/main/native/include/maps_column_view.hpp index be25dbd2e55..93c117aef18 100644 --- a/java/src/main/native/include/maps_column_view.hpp +++ b/java/src/main/native/include/maps_column_view.hpp @@ -19,10 +19,9 @@ #include #include #include +#include #include -#include -#include namespace cudf { @@ -87,7 +86,7 @@ class maps_column_view { std::unique_ptr get_values_for( column_view const& keys, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; /** * @brief Map lookup by a scalar key. @@ -106,7 +105,7 @@ class maps_column_view { std::unique_ptr get_values_for( scalar const& key, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; /** * @brief Check if each map row contains a specified scalar key. @@ -127,7 +126,7 @@ class maps_column_view { std::unique_ptr contains( scalar const& key, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; /** * @brief Check if each map row contains keys specified by a column @@ -149,7 +148,7 @@ class maps_column_view { std::unique_ptr contains( column_view const& key, rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const; + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) const; private: lists_column_view keys_, values_; diff --git a/java/src/main/native/src/ColumnVectorJni.cpp b/java/src/main/native/src/ColumnVectorJni.cpp index 9b718b2ed83..7285a0f1b5c 100644 --- a/java/src/main/native/src/ColumnVectorJni.cpp +++ b/java/src/main/native/src/ColumnVectorJni.cpp @@ -34,8 +34,7 @@ #include #include #include - -#include +#include #include #include @@ -399,7 +398,7 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_ColumnVector_concatenate(JNIEnv* env return release_as_jlong( is_lists_column ? cudf::lists::detail::concatenate( - columns, cudf::get_default_stream(), rmm::mr::get_current_device_resource()) + columns, cudf::get_default_stream(), cudf::get_current_device_resource_ref()) : cudf::concatenate(columns)); } CATCH_STD(env, 0); diff --git a/java/src/main/native/src/ColumnViewJni.cu b/java/src/main/native/src/ColumnViewJni.cu index 46261b087ae..9558c3ccbeb 100644 --- a/java/src/main/native/src/ColumnViewJni.cu +++ b/java/src/main/native/src/ColumnViewJni.cu @@ -28,11 +28,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -134,7 +134,7 @@ void post_process_list_overlap(cudf::column_view const& lhs, validity.end(), thrust::identity{}, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); if (new_null_count > 0) { // If the `overlap_result` column is nullable, perform `bitmask_and` of its nullmask and the @@ -146,7 +146,7 @@ void post_process_list_overlap(cudf::column_view const& lhs, std::vector{0, 0}, overlap_cv.size(), stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); overlap_result->set_null_mask(std::move(null_mask), null_count); } else { // Just set the output nullmask as the new nullmask. @@ -179,7 +179,7 @@ std::unique_ptr lists_distinct_by_key(cudf::lists_column_view cons cudf::null_equality::EQUAL, cudf::nan_equality::ALL_EQUAL, stream, - rmm::mr::get_current_device_resource()) + cudf::get_current_device_resource_ref()) ->release(); auto const out_labels = out_columns.front()->view(); @@ -206,7 +206,7 @@ std::unique_ptr lists_distinct_by_key(cudf::lists_column_view cons std::move(out_offsets), std::move(out_structs), input.null_count(), - cudf::detail::copy_bitmask(input.parent(), stream, rmm::mr::get_current_device_resource()), + cudf::detail::copy_bitmask(input.parent(), stream, cudf::get_current_device_resource_ref()), stream); } diff --git a/java/src/main/native/src/RmmJni.cpp b/java/src/main/native/src/RmmJni.cpp index 09c04a77590..23c7b7fb243 100644 --- a/java/src/main/native/src/RmmJni.cpp +++ b/java/src/main/native/src/RmmJni.cpp @@ -16,6 +16,7 @@ #include "cudf_jni_apis.hpp" +#include #include #include @@ -27,10 +28,8 @@ #include #include #include -#include #include #include -#include #include #include @@ -617,7 +616,7 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Rmm_allocInternal(JNIEnv* env, { try { cudf::jni::auto_set_device(env); - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource(); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref(); auto c_stream = rmm::cuda_stream_view(reinterpret_cast(stream)); void* ret = mr.allocate_async(size, rmm::CUDA_ALLOCATION_ALIGNMENT, c_stream); return reinterpret_cast(ret); @@ -630,7 +629,7 @@ Java_ai_rapids_cudf_Rmm_free(JNIEnv* env, jclass clazz, jlong ptr, jlong size, j { try { cudf::jni::auto_set_device(env); - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource(); + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref(); void* cptr = reinterpret_cast(ptr); auto c_stream = rmm::cuda_stream_view(reinterpret_cast(stream)); mr.deallocate_async(cptr, size, rmm::CUDA_ALLOCATION_ALIGNMENT, c_stream); @@ -1002,7 +1001,7 @@ JNIEXPORT void JNICALL Java_ai_rapids_cudf_Rmm_setCurrentDeviceResourceInternal( try { cudf::jni::auto_set_device(env); auto mr = reinterpret_cast(new_handle); - rmm::mr::set_current_device_resource(mr); + cudf::set_current_device_resource(mr); } CATCH_STD(env, ) } diff --git a/java/src/main/native/src/TableJni.cpp b/java/src/main/native/src/TableJni.cpp index c749c8c84bf..c5abf08a59d 100644 --- a/java/src/main/native/src/TableJni.cpp +++ b/java/src/main/native/src/TableJni.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -3951,7 +3952,7 @@ JNIEXPORT jlongArray JNICALL Java_ai_rapids_cudf_Table_dropDuplicates( nulls_equal ? cudf::null_equality::EQUAL : cudf::null_equality::UNEQUAL, cudf::nan_equality::ALL_EQUAL, cudf::get_default_stream(), - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); return convert_table_for_return(env, result); } CATCH_STD(env, 0); @@ -4116,7 +4117,7 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Table_makeChunkedPack( // and scratch memory only. auto temp_mr = memoryResourceHandle != 0 ? reinterpret_cast(memoryResourceHandle) - : rmm::mr::get_current_device_resource(); + : cudf::get_current_device_resource_ref(); auto chunked_pack = cudf::chunked_pack::create(*n_table, bounce_buffer_size, temp_mr); return reinterpret_cast(chunked_pack.release()); } diff --git a/java/src/main/native/src/maps_column_view.cu b/java/src/main/native/src/maps_column_view.cu index d3ee52c074c..d26ae86f531 100644 --- a/java/src/main/native/src/maps_column_view.cu +++ b/java/src/main/native/src/maps_column_view.cu @@ -18,9 +18,9 @@ #include #include #include +#include #include -#include #include @@ -65,7 +65,7 @@ std::unique_ptr get_values_for_impl(maps_column_view const& maps_view, lookup_keys, lists::duplicate_find_option::FIND_LAST, stream, - rmm::mr::get_current_device_resource()); + cudf::get_current_device_resource_ref()); auto constexpr absent_offset = size_type{-1}; auto constexpr nullity_offset = std::numeric_limits::min(); thrust::replace(rmm::exec_policy(stream), @@ -103,7 +103,7 @@ std::unique_ptr contains_impl(maps_column_view const& maps_view, CUDF_EXPECTS(lookup_keys.type().id() == keys.child().type().id(), "Lookup keys must have the same type as the keys of the map column."); auto const contains = - lists::detail::contains(keys, lookup_keys, stream, rmm::mr::get_current_device_resource()); + lists::detail::contains(keys, lookup_keys, stream, cudf::get_current_device_resource_ref()); // Replace nulls with BOOL8{false}; auto const scalar_false = numeric_scalar{false, true, stream}; return detail::replace_nulls(contains->view(), scalar_false, stream, mr); diff --git a/python/cudf/udf_cpp/strings/src/strings/udf/udf_apis.cu b/python/cudf/udf_cpp/strings/src/strings/udf/udf_apis.cu index b924995cf4b..6fab2684ce4 100644 --- a/python/cudf/udf_cpp/strings/src/strings/udf/udf_apis.cu +++ b/python/cudf/udf_cpp/strings/src/strings/udf/udf_apis.cu @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -58,7 +59,7 @@ std::unique_ptr to_string_view_array(cudf::column_view const { return std::make_unique( std::move(cudf::strings::create_string_vector_from_column( - cudf::strings_column_view(input), stream, rmm::mr::get_current_device_resource()) + cudf::strings_column_view(input), stream, cudf::get_current_device_resource_ref()) .release())); } diff --git a/python/pylibcudf/pylibcudf/libcudf/interop.pxd b/python/pylibcudf/pylibcudf/libcudf/interop.pxd index 9228c017d93..30b97fdec34 100644 --- a/python/pylibcudf/pylibcudf/libcudf/interop.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/interop.pxd @@ -70,8 +70,8 @@ cdef extern from *: ArrowArray* to_arrow_host_raw( cudf::table_view const& tbl, - rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) { + rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { // Assumes the sync event is null and the data is already on the host. ArrowArray *arr = new ArrowArray(); auto device_arr = cudf::to_arrow_host(tbl, stream, mr); From afc9f4f84e4031fd028046a7668afec27d79627e Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 10 Sep 2024 07:21:28 -1000 Subject: [PATCH 4/4] Add labeling pylibcudf doc pages (#16779) Follow up to https://github.com/rapidsai/cudf/pull/16761, I forgot to add the doc pages for the labeling pylibcudf APIs Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - Matthew Murray (https://github.com/Matt711) URL: https://github.com/rapidsai/cudf/pull/16779 --- docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst | 1 + docs/cudf/source/user_guide/api_docs/pylibcudf/labeling.rst | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 docs/cudf/source/user_guide/api_docs/pylibcudf/labeling.rst diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst index 6a2b66e8ea0..d6f8cd2a1ff 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst @@ -21,6 +21,7 @@ This page provides API documentation for pylibcudf. groupby interop join + labeling lists merge null_mask diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/labeling.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/labeling.rst new file mode 100644 index 00000000000..3f3ae4c5a77 --- /dev/null +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/labeling.rst @@ -0,0 +1,6 @@ +======== +labeling +======== + +.. automodule:: pylibcudf.labeling + :members: