Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify macros and cmake options that control the suppression of deprecation warnings #3220

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,17 @@
"CCCL_ENABLE_EXAMPLES": true,
"CCCL_ENABLE_BENCHMARKS": true,
"CCCL_ENABLE_C": true,
"LIBCUDACXX_IGNORE_DEPRECATED_CPP_DIALECT": true,
"CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true,
"LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS": true,
"CUB_ENABLE_TESTING": true,
"CUB_ENABLE_EXAMPLES": true,
"CUB_SEPARATE_CATCH2": true,
"CUB_IGNORE_DEPRECATED_CPP_DIALECT": true,
"CUB_ENABLE_DIALECT_CPP11": true,
"CUB_ENABLE_DIALECT_CPP14": true,
"CUB_ENABLE_DIALECT_CPP17": true,
"CUB_ENABLE_DIALECT_CPP20": true,
"THRUST_ENABLE_MULTICONFIG": true,
"THRUST_MULTICONFIG_WORKLOAD": "LARGE",
"THRUST_IGNORE_DEPRECATED_CPP_DIALECT": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP11": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP14": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP17": true,
Expand Down Expand Up @@ -118,10 +116,10 @@
"inherits": "base",
"cacheVariables": {
"CCCL_ENABLE_LIBCUDACXX": true,
"CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true,
"LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS": false,
"libcudacxx_ENABLE_CODEGEN": true,
"LIBCUDACXX_ENABLE_CUDA": false,
"LIBCUDACXX_IGNORE_DEPRECATED_CPP_DIALECT": true
"LIBCUDACXX_ENABLE_CUDA": false
}
},
{
Expand All @@ -141,7 +139,7 @@
"CMAKE_CXX_STANDARD": "11",
"CMAKE_CUDA_STANDARD": "11",
"LIBCUDACXX_TEST_STANDARD_VER": "c++11",
"LIBCUDACXX_IGNORE_DEPRECATED_CPP_11": true
"CCCL_IGNORE_DEPRECATED_CPP_11": true
}
},
{
Expand All @@ -152,7 +150,7 @@
"CMAKE_CXX_STANDARD": "14",
"CMAKE_CUDA_STANDARD": "14",
"LIBCUDACXX_TEST_STANDARD_VER": "c++14",
"LIBCUDACXX_IGNORE_DEPRECATED_CPP_14": true
"CCCL_IGNORE_DEPRECATED_CPP_14": true
}
},
{
Expand Down Expand Up @@ -192,7 +190,7 @@
"CMAKE_CXX_STANDARD": "11",
"CMAKE_CUDA_STANDARD": "11",
"LIBCUDACXX_TEST_STANDARD_VER": "c++11",
"LIBCUDACXX_IGNORE_DEPRECATED_CPP_11": true
"CCCL_IGNORE_DEPRECATED_CPP_11": true
}
},
{
Expand All @@ -203,7 +201,7 @@
"CMAKE_CXX_STANDARD": "14",
"CMAKE_CUDA_STANDARD": "14",
"LIBCUDACXX_TEST_STANDARD_VER": "c++14",
"LIBCUDACXX_IGNORE_DEPRECATED_CPP_14": true
"CCCL_IGNORE_DEPRECATED_CPP_14": true
}
},
{
Expand Down Expand Up @@ -246,7 +244,7 @@
"displayName": "CUB: C++11",
"inherits": "cub-base",
"cacheVariables": {
"CUB_IGNORE_DEPRECATED_CPP_DIALECT": true,
"CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true,
"CUB_ENABLE_DIALECT_CPP11": true
}
},
Expand All @@ -255,7 +253,7 @@
"displayName": "CUB: C++14",
"inherits": "cub-base",
"cacheVariables": {
"CUB_IGNORE_DEPRECATED_CPP_DIALECT": true,
"CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true,
"CUB_ENABLE_DIALECT_CPP14": true
}
},
Expand Down Expand Up @@ -297,7 +295,7 @@
"displayName": "Thrust: C++11",
"inherits": "thrust-base",
"cacheVariables": {
"THRUST_IGNORE_DEPRECATED_CPP_DIALECT": true,
"CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP11": true
}
},
Expand All @@ -306,7 +304,7 @@
"displayName": "Thrust: C++14",
"inherits": "thrust-base",
"cacheVariables": {
"THRUST_IGNORE_DEPRECATED_CPP_DIALECT": true,
"CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP14": true
}
},
Expand Down
2 changes: 1 addition & 1 deletion ci/windows/build_cub.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $PRESET = "cub-cpp$CXX_STANDARD"
$CMAKE_OPTIONS = ""

if ($CL_VERSION -lt [version]"19.20") {
$CMAKE_OPTIONS += "-DCUB_IGNORE_DEPRECATED_COMPILER=ON "
$CMAKE_OPTIONS += "-DCCCL_IGNORE_DEPRECATED_COMPILER=ON "
}

configure_and_build_preset "CUB" "$PRESET" "$CMAKE_OPTIONS"
Expand Down
2 changes: 1 addition & 1 deletion ci/windows/build_thrust.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $PRESET = "thrust-cpp$CXX_STANDARD"
$CMAKE_OPTIONS = ""

if ($CL_VERSION -lt [version]"19.20") {
$CMAKE_OPTIONS += "-DTHRUST_IGNORE_DEPRECATED_COMPILER=ON "
$CMAKE_OPTIONS += "-DCCCL_IGNORE_DEPRECATED_COMPILER=ON "
}

configure_and_build_preset "Thrust" "$PRESET" "$CMAKE_OPTIONS"
Expand Down
7 changes: 0 additions & 7 deletions cub/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ option(CUB_ENABLE_CPP_DIALECT_IN_NAMES
)
mark_as_advanced(CUB_ENABLE_CPP_DIALECT_IN_NAMES)

# This option is only used when CUB is built stand-alone; otherwise the Thrust
# option has the same effect.
option(CUB_IGNORE_DEPRECATED_API
"Suppress warnings about deprecated Thrust/CUB API."
OFF
)

# Check if we're actually building anything before continuing. If not, no need
# to search for deps, etc. This is a common approach for packagers that just
# need the install rules. See GH issue NVIDIA/thrust#1211.
Expand Down
2 changes: 1 addition & 1 deletion cub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ could be aliased to global memory allocations).

CUB is regularly tested using the specified versions of the following
compilers. Unsupported versions may emit deprecation warnings, which can be
silenced by defining CUB_IGNORE_DEPRECATED_COMPILER during compilation.
silenced by defining CCCL_IGNORE_DEPRECATED_COMPILER during compilation.

- NVCC 11.0+
- GCC 5+
Expand Down
9 changes: 6 additions & 3 deletions cub/cmake/CubBuildTargetList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,12 @@ function(cub_build_target_list)

# Generic config flags:
macro(add_flag_option flag docstring default)
set(cub_opt "CUB_${flag}")
option(${cub_opt} "${docstring}" "${default}")
mark_as_advanced(${cub_opt})
set(opt "CCCL_${flag}")
option(${opt} "${docstring}" "${default}")
mark_as_advanced(${opt})
if(DEFINED CUB_${flag})
message(WARNING "The CUB_${flag} cmake option is deprecated. Use ${opt} instead.")
endif()
endmacro()
add_flag_option(IGNORE_DEPRECATED_CPP_DIALECT "Don't warn about any deprecated C++ standards and compilers." OFF)
add_flag_option(IGNORE_DEPRECATED_CPP_11 "Don't warn about deprecated C++11." OFF)
Expand Down
1 change: 0 additions & 1 deletion cub/cub/config.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@
#include <cub/util_arch.cuh> // IWYU pragma: export
#include <cub/util_compiler.cuh> // IWYU pragma: export
#include <cub/util_cpp_dialect.cuh> // IWYU pragma: export
#include <cub/util_deprecated.cuh> // IWYU pragma: export
#include <cub/util_macro.cuh> // IWYU pragma: export
#include <cub/util_namespace.cuh> // IWYU pragma: export
1 change: 0 additions & 1 deletion cub/cub/device/device_adjacent_difference.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <cub/detail/nvtx.cuh>
#include <cub/detail/type_traits.cuh>
#include <cub/device/dispatch/dispatch_adjacent_difference.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_namespace.cuh>

#include <thrust/detail/integer_traits.h>
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_histogram.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

#include <cub/detail/nvtx.cuh>
#include <cub/device/dispatch/dispatch_histogram.cuh>
#include <cub/util_deprecated.cuh>

#include <iterator>
#include <limits>
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_merge_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <cub/detail/choose_offset.cuh>
#include <cub/detail/nvtx.cuh>
#include <cub/device/dispatch/dispatch_merge_sort.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_namespace.cuh>

CUB_NAMESPACE_BEGIN
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_partition.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <cub/detail/nvtx.cuh>
#include <cub/device/dispatch/dispatch_select_if.cuh>
#include <cub/device/dispatch/dispatch_three_way_partition.cuh>
#include <cub/util_deprecated.cuh>

#include <iterator>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_radix_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <cub/detail/choose_offset.cuh>
#include <cub/detail/nvtx.cuh>
#include <cub/device/dispatch/dispatch_radix_sort.cuh>
#include <cub/util_deprecated.cuh>

#include <cuda/std/type_traits>

Expand Down
13 changes: 6 additions & 7 deletions cub/cub/device/device_reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <cub/device/dispatch/dispatch_reduce.cuh>
#include <cub/device/dispatch/dispatch_reduce_by_key.cuh>
#include <cub/device/dispatch/dispatch_streaming_reduce.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_type.cuh>

#include <thrust/iterator/tabulate_output_iterator.h>
Expand Down Expand Up @@ -713,9 +712,9 @@ struct DeviceReduce
//! **[optional]** CUDA stream to launch kernels within. Default is stream\ :sub:`0`.
//! @endrst
template <typename InputIteratorT, typename OutputIteratorT>
CUB_DEPRECATED_BECAUSE("CUB has superseded this interface in favor of the ArgMin interface that takes two separate "
"iterators: one iterator to which the extremum is written and another iterator to which the "
"index of the found extremum is written. ")
CCCL_DEPRECATED_BECAUSE("CUB has superseded this interface in favor of the ArgMin interface that takes two separate "
"iterators: one iterator to which the extremum is written and another iterator to which the "
"index of the found extremum is written. ")
CUB_RUNTIME_FUNCTION static cudaError_t
ArgMin(void* d_temp_storage,
size_t& temp_storage_bytes,
Expand Down Expand Up @@ -1117,9 +1116,9 @@ struct DeviceReduce
//! **[optional]** CUDA stream to launch kernels within. Default is stream\ :sub:`0`.
//! @endrst
template <typename InputIteratorT, typename OutputIteratorT>
CUB_DEPRECATED_BECAUSE("CUB has superseded this interface in favor of the ArgMax interface that takes two separate "
"iterators: one iterator to which the extremum is written and another iterator to which the "
"index of the found extremum is written. ")
CCCL_DEPRECATED_BECAUSE("CUB has superseded this interface in favor of the ArgMax interface that takes two separate "
"iterators: one iterator to which the extremum is written and another iterator to which the "
"index of the found extremum is written. ")
CUB_RUNTIME_FUNCTION static cudaError_t
ArgMax(void* d_temp_storage,
size_t& temp_storage_bytes,
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_run_length_encode.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include <cub/device/dispatch/dispatch_reduce_by_key.cuh>
#include <cub/device/dispatch/dispatch_rle.cuh>
#include <cub/device/dispatch/tuning/tuning_run_length_encode.cuh>
#include <cub/util_deprecated.cuh>

#include <iterator>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_scan.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <cub/device/dispatch/dispatch_scan.cuh>
#include <cub/device/dispatch/dispatch_scan_by_key.cuh>
#include <cub/thread/thread_operators.cuh>
#include <cub/util_deprecated.cuh>

#include <cuda/std/__functional/invoke.h>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_segmented_radix_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

#include <cub/detail/nvtx.cuh>
#include <cub/device/dispatch/dispatch_radix_sort.cuh>
#include <cub/util_deprecated.cuh>

#include <iterator>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_segmented_reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <cub/device/dispatch/dispatch_reduce.cuh>
#include <cub/device/dispatch/dispatch_reduce_by_key.cuh>
#include <cub/iterator/arg_index_input_iterator.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_type.cuh>

#include <cuda/std/type_traits>
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_segmented_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

#include <cub/detail/nvtx.cuh>
#include <cub/device/dispatch/dispatch_segmented_sort.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_namespace.cuh>

CUB_NAMESPACE_BEGIN
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_select.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <cub/detail/nvtx.cuh>
#include <cub/device/dispatch/dispatch_select_if.cuh>
#include <cub/device/dispatch/dispatch_unique_by_key.cuh>
#include <cub/util_deprecated.cuh>

#include <cuda/std/type_traits>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/device_spmv.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

#include <cub/detail/nvtx.cuh>
#include <cub/device/dispatch/dispatch_spmv_orig.cuh>
#include <cub/util_deprecated.cuh>

#include <iterator>
#include <limits>
Expand Down
3 changes: 1 addition & 2 deletions cub/cub/device/dispatch/dispatch_adjacent_difference.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <cub/detail/type_traits.cuh>
#include <cub/device/dispatch/tuning/tuning_adjacent_difference.cuh>
#include <cub/util_debug.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>
#include <cub/util_namespace.cuh>
Expand Down Expand Up @@ -140,7 +139,7 @@ struct DispatchAdjacentDifference

#ifndef _CCCL_DOXYGEN_INVOKED // Do not document
CUB_DETAIL_RUNTIME_DEBUG_SYNC_IS_NOT_SUPPORTED
CUB_DEPRECATED CUB_RUNTIME_FUNCTION _CCCL_FORCEINLINE DispatchAdjacentDifference(
CCCL_DEPRECATED CUB_RUNTIME_FUNCTION _CCCL_FORCEINLINE DispatchAdjacentDifference(
void* d_temp_storage,
std::size_t& temp_storage_bytes,
InputIteratorT d_input,
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_histogram.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <cub/grid/grid_queue.cuh>
#include <cub/thread/thread_search.cuh>
#include <cub/util_debug.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>
#include <cub/util_temporary_storage.cuh>
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_merge_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

#include <cub/agent/agent_merge_sort.cuh>
#include <cub/device/dispatch/tuning/tuning_merge_sort.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>
#include <cub/util_namespace.cuh>
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_radix_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include <cub/device/dispatch/tuning/tuning_radix_sort.cuh>
#include <cub/grid/grid_even_share.cuh>
#include <cub/util_debug.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>
#include <cub/util_type.cuh>
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include <cub/thread/thread_operators.cuh>
#include <cub/thread/thread_store.cuh>
#include <cub/util_debug.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_temporary_storage.cuh>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_reduce_by_key.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include <cub/device/dispatch/tuning/tuning_reduce_by_key.cuh>
#include <cub/grid/grid_queue.cuh>
#include <cub/thread/thread_operators.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_scan.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <cub/grid/grid_queue.cuh>
#include <cub/thread/thread_operators.cuh>
#include <cub/util_debug.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_scan_by_key.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include <cub/device/dispatch/tuning/tuning_scan_by_key.cuh>
#include <cub/thread/thread_operators.cuh>
#include <cub/util_debug.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>

Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_segmented_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include <cub/device/dispatch/tuning/tuning_segmented_sort.cuh>
#include <cub/thread/thread_sort.cuh>
#include <cub/util_debug.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>
#include <cub/util_namespace.cuh>
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_select_if.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include <cub/device/dispatch/tuning/tuning_select_if.cuh>
#include <cub/grid/grid_queue.cuh>
#include <cub/thread/thread_operators.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>
#include <cub/util_vsmem.cuh>
Expand Down
1 change: 0 additions & 1 deletion cub/cub/device/dispatch/dispatch_spmv_orig.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#include <cub/grid/grid_queue.cuh>
#include <cub/thread/thread_search.cuh>
#include <cub/util_debug.cuh>
#include <cub/util_deprecated.cuh>
#include <cub/util_device.cuh>
#include <cub/util_math.cuh>
#include <cub/util_type.cuh>
Expand Down
Loading
Loading