Skip to content

Commit cbfaee1

Browse files
committed
Drop excec policy in thrust benchmark
1 parent 6ae19fd commit cbfaee1

File tree

1 file changed

+3
-6
lines changed
  • thrust/benchmarks/bench/mismatch

1 file changed

+3
-6
lines changed

thrust/benchmarks/bench/mismatch/basic.cu

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,11 @@ static void range_range(nvbench::state& state, nvbench::type_list<T>)
5656
state.add_global_memory_reads<T>(mismatch_point + 1);
5757
state.add_global_memory_writes<size_t>(1);
5858

59-
cuda::stream stream{cuda::device_ref{0}};
60-
cuda::device_memory_pool_ref alloc = cuda::device_default_memory_pool(stream.device());
61-
62-
auto policy = cuda::execution::gpu.with_stream(stream).with_memory_resource(alloc);
59+
caching_allocator_t alloc{};
6360
state.exec(nvbench::exec_tag::gpu | nvbench::exec_tag::no_batch | nvbench::exec_tag::sync,
6461
[&](nvbench::launch& launch) {
65-
(void) cuda::std::mismatch(
66-
policy.with_stream(launch.get_stream().get_stream()),
62+
(void) thrust::mismatch(
63+
policy(alloc, launch),
6764
dinput.begin(),
6865
dinput.end(),
6966
cuda::constant_iterator<T>{0},

0 commit comments

Comments
 (0)