Add nvbench::make_cuda_stream_view(cudaStream_t).

This commit is contained in:
Allison Vacanti
2022-02-11 13:26:10 -05:00
parent 8ae58981ca
commit 3b41387637
2 changed files with 13 additions and 3 deletions

View File

@@ -49,8 +49,7 @@ void stream_bench(nvbench::state &state)
// Set CUDA default stream as the target stream. Note the default stream
// is non-owning.
cudaStream_t default_stream = 0;
state.set_cuda_stream(
nvbench::cuda_stream{default_stream, false /*owning = false*/});
state.set_cuda_stream(nvbench::make_cuda_stream_view(default_stream));
state.exec([&input, &output, num_values](nvbench::launch &) {
copy(thrust::raw_pointer_cast(input.data()),
@@ -58,5 +57,4 @@ void stream_bench(nvbench::state &state)
num_values);
});
}
NVBENCH_BENCH(stream_bench);