From ce7e99119185694de2f6625ba76cc30438e10394 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 13 Nov 2024 06:33:33 +0000 Subject: [PATCH] Remove patch for 64-bit dispatching. --- cpp/cmake/thirdparty/get_cccl.cmake | 3 + .../thirdparty/patches/cccl_override.json | 5 -- .../thrust_disable_64bit_dispatching.diff | 59 ------------------- 3 files changed, 3 insertions(+), 64 deletions(-) delete mode 100644 cpp/cmake/thirdparty/patches/thrust_disable_64bit_dispatching.diff diff --git a/cpp/cmake/thirdparty/get_cccl.cmake b/cpp/cmake/thirdparty/get_cccl.cmake index 5494ad018fb..8e74d3347e1 100644 --- a/cpp/cmake/thirdparty/get_cccl.cmake +++ b/cpp/cmake/thirdparty/get_cccl.cmake @@ -34,6 +34,9 @@ function(find_and_configure_cccl) ) # Find or install CCCL with our custom set of patches + # TODO: Does this work correctly? Is there a better way to set this? Should + # CCCL be setting THRUST_DISPATCH_TYPE with "FORCE"? + set(THRUST_DISPATCH_TYPE "Force32bit" STRING "Thrust offset type dispatch") rapids_cpm_cccl(BUILD_EXPORT_SET cudf-exports INSTALL_EXPORT_SET cudf-exports) endfunction() diff --git a/cpp/cmake/thirdparty/patches/cccl_override.json b/cpp/cmake/thirdparty/patches/cccl_override.json index 2f29578f7ae..d5cadce40c2 100644 --- a/cpp/cmake/thirdparty/patches/cccl_override.json +++ b/cpp/cmake/thirdparty/patches/cccl_override.json @@ -3,11 +3,6 @@ "packages" : { "CCCL" : { "patches" : [ - { - "file" : "${current_json_dir}/thrust_disable_64bit_dispatching.diff", - "issue" : "Remove 64bit dispatching as not needed by libcudf and results in compiling twice as many kernels [https://github.com/rapidsai/cudf/pull/11437]", - "fixed_in" : "" - }, { "file" : "${current_json_dir}/thrust_faster_sort_compile_times.diff", "issue" : "Improve Thrust sort compile times by not unrolling loops for inlined comparators [https://github.com/rapidsai/cudf/pull/10577]", diff --git a/cpp/cmake/thirdparty/patches/thrust_disable_64bit_dispatching.diff b/cpp/cmake/thirdparty/patches/thrust_disable_64bit_dispatching.diff deleted file mode 100644 index 291eabe25fd..00000000000 --- a/cpp/cmake/thirdparty/patches/thrust_disable_64bit_dispatching.diff +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/thrust/thrust/system/cuda/detail/dispatch.h b/thrust/thrust/system/cuda/detail/dispatch.h -index 971b93d62..0d6b25b07 100644 ---- a/thrust/thrust/system/cuda/detail/dispatch.h -+++ b/thrust/thrust/system/cuda/detail/dispatch.h -@@ -36,16 +36,15 @@ - * that callables for both branches consist of the same tokens, and is intended to be used with Thrust-style dispatch - * interfaces, that always deduce the size type from the arguments. - */ --#define THRUST_INDEX_TYPE_DISPATCH(status, call, count, arguments) \ -- if (count <= thrust::detail::integer_traits::const_max) \ -- { \ -- auto THRUST_PP_CAT2(count, _fixed) = static_cast(count); \ -- status = call arguments; \ -- } \ -- else \ -- { \ -- auto THRUST_PP_CAT2(count, _fixed) = static_cast(count); \ -- status = call arguments; \ -+#define THRUST_INDEX_TYPE_DISPATCH(status, call, count, arguments) \ -+ if (count <= thrust::detail::integer_traits::const_max) \ -+ { \ -+ auto THRUST_PP_CAT2(count, _fixed) = static_cast(count); \ -+ status = call arguments; \ -+ } \ -+ else \ -+ { \ -+ throw std::runtime_error("THRUST_INDEX_TYPE_DISPATCH 64-bit count is unsupported in libcudf"); \ - } - - /** -@@ -55,18 +54,16 @@ - * - * This version of the macro supports providing two count variables, which is necessary for set algorithms. - */ --#define THRUST_DOUBLE_INDEX_TYPE_DISPATCH(status, call, count1, count2, arguments) \ -- if (count1 + count2 <= thrust::detail::integer_traits::const_max) \ -- { \ -- auto THRUST_PP_CAT2(count1, _fixed) = static_cast(count1); \ -- auto THRUST_PP_CAT2(count2, _fixed) = static_cast(count2); \ -- status = call arguments; \ -- } \ -- else \ -- { \ -- auto THRUST_PP_CAT2(count1, _fixed) = static_cast(count1); \ -- auto THRUST_PP_CAT2(count2, _fixed) = static_cast(count2); \ -- status = call arguments; \ -+#define THRUST_DOUBLE_INDEX_TYPE_DISPATCH(status, call, count1, count2, arguments) \ -+ if (count1 + count2 <= thrust::detail::integer_traits::const_max) \ -+ { \ -+ auto THRUST_PP_CAT2(count1, _fixed) = static_cast(count1); \ -+ auto THRUST_PP_CAT2(count2, _fixed) = static_cast(count2); \ -+ status = call arguments; \ -+ } \ -+ else \ -+ { \ -+ throw std::runtime_error("THRUST_DOUBLE_INDEX_TYPE_DISPATCH 64-bit count is unsupported in libcudf"); \ - } - - /**