Skip to content

Commit 5b84c17

Browse files
authored
Fix some warnings in cub headers that are picked up by the libcu++ tests (#6522)
1 parent 39e2233 commit 5b84c17

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

cub/cub/device/device_reduce.cuh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,9 +1296,6 @@ public:
12961296
static_assert(!::cuda::std::is_same_v<requested_determinism_t, ::cuda::execution::determinism::gpu_to_gpu_t>,
12971297
"gpu_to_gpu determinism is not supported");
12981298

1299-
// TODO(NaderAlAwar): Relax this once non-deterministic implementation for min / max is available
1300-
using determinism_t = ::cuda::execution::determinism::run_to_run_t;
1301-
13021299
// Query relevant properties from the environment
13031300
auto stream = ::cuda::std::execution::__query_or(env, ::cuda::get_stream, ::cuda::stream_ref{cudaStream_t{}});
13041301
auto mr =
@@ -1307,9 +1304,6 @@ public:
13071304
void* d_temp_storage = nullptr;
13081305
size_t temp_storage_bytes = 0;
13091306

1310-
using tuning_t =
1311-
::cuda::std::execution::__query_result_or_t<EnvT, ::cuda::execution::__get_tuning_t, ::cuda::std::execution::env<>>;
1312-
13131307
// Reduction operation
13141308
using ReduceOpT = cub::ArgMin;
13151309
using InputValueT = cub::detail::it_value_t<InputIteratorT>;
@@ -2092,9 +2086,6 @@ public:
20922086
static_assert(!::cuda::std::is_same_v<requested_determinism_t, ::cuda::execution::determinism::gpu_to_gpu_t>,
20932087
"gpu_to_gpu determinism is not supported");
20942088

2095-
// TODO(NaderAlAwar): Relax this once non-deterministic implementation for min / max is available
2096-
using determinism_t = ::cuda::execution::determinism::run_to_run_t;
2097-
20982089
// Query relevant properties from the environment
20992090
auto stream = ::cuda::std::execution::__query_or(env, ::cuda::get_stream, ::cuda::stream_ref{cudaStream_t{}});
21002091
auto mr =
@@ -2103,9 +2094,6 @@ public:
21032094
void* d_temp_storage = nullptr;
21042095
size_t temp_storage_bytes = 0;
21052096

2106-
using tuning_t =
2107-
::cuda::std::execution::__query_result_or_t<EnvT, ::cuda::execution::__get_tuning_t, ::cuda::std::execution::env<>>;
2108-
21092097
// Reduction operation
21102098
using ReduceOpT = cub::ArgMax;
21112099
using InputValueT = cub::detail::it_value_t<InputIteratorT>;

cub/cub/device/dispatch/dispatch_streaming_reduce.cuh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ struct dispatch_streaming_arg_reduce_t
192192
InitT init,
193193
cudaStream_t stream)
194194
{
195-
// Constant iterator to provide the offset of the current partition for the user-provided input iterator
196-
using constant_offset_it_t = THRUST_NS_QUALIFIER::constant_iterator<GlobalOffsetT>;
197-
198195
// Wrapped input iterator to produce index-value tuples, i.e., <PerPartitionOffsetT, InputT>-tuples
199196
// We make sure to offset the user-provided input iterator by the current partition's offset
200197
using arg_index_input_iterator_t = ArgIndexInputIterator<InputIteratorT, PerPartitionOffsetT, InitT>;

cub/cub/device/dispatch/kernels/kernel_reduce.cuh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,13 @@ __launch_bounds__(int(ChainedPolicyT::ActivePolicy::ReducePolicy::BLOCK_THREADS)
335335
int n_threads = reduce_grid_size * block_threads;
336336

337337
_CCCL_PRAGMA_UNROLL_FULL()
338-
for (::cuda::std::uint32_t i = tid; i < num_items; i += (n_threads * items_per_thread))
338+
for (unsigned i = tid; i < static_cast<unsigned>(num_items); i += (n_threads * items_per_thread))
339339
{
340340
ftype items[items_per_thread] = {};
341341
for (int j = 0; j < items_per_thread; j++)
342342
{
343-
const ::cuda::std::uint32_t idx = i + j * n_threads;
344-
if (idx < num_items)
343+
const unsigned idx = i + j * n_threads;
344+
if (idx < static_cast<unsigned>(num_items))
345345
{
346346
items[j] = transform_op(d_in[idx]);
347347
}

0 commit comments

Comments
 (0)