From ca2ed3e9be5aff25026455db4b24168d095c0a44 Mon Sep 17 00:00:00 2001 From: Allison Vacanti Date: Mon, 8 Mar 2021 18:36:59 -0500 Subject: [PATCH] Example kernels need streams... --- examples/axes.cu | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/axes.cu b/examples/axes.cu index b5b406a..09fc2c0 100644 --- a/examples/axes.cu +++ b/examples/axes.cu @@ -79,9 +79,10 @@ void copy_sweep_grid_shape(nvbench::state &state) num_values, in_ptr = thrust::raw_pointer_cast(in.data()), out_ptr = thrust::raw_pointer_cast(out.data())](nvbench::launch &launch) { - nvbench::copy_kernel<<>>(in_ptr, - out_ptr, - num_values); + nvbench::copy_kernel<<>>( + in_ptr, + out_ptr, + num_values); }); } NVBENCH_BENCH(copy_sweep_grid_shape) @@ -111,7 +112,9 @@ void copy_type_sweep(nvbench::state &state, nvbench::type_list) [num_values, in_ptr = thrust::raw_pointer_cast(in.data()), out_ptr = thrust::raw_pointer_cast(out.data())](nvbench::launch &launch) { - nvbench::copy_kernel<<<256, 256>>>(in_ptr, out_ptr, num_values); + nvbench::copy_kernel<<<256, 256, 0, launch.get_stream()>>>(in_ptr, + out_ptr, + num_values); }); } // Define a type_list to use for the type axis: @@ -155,7 +158,9 @@ void copy_type_conversion_sweep(nvbench::state &state, [num_values, in_ptr = thrust::raw_pointer_cast(in.data()), out_ptr = thrust::raw_pointer_cast(out.data())](nvbench::launch &launch) { - nvbench::copy_kernel<<<256, 256>>>(in_ptr, out_ptr, num_values); + nvbench::copy_kernel<<<256, 256, 0, launch.get_stream()>>>(in_ptr, + out_ptr, + num_values); }); } // Optional: Skip when InputType == OutputType. This approach avoids