Skip to content

Commit f4e624e

Browse files
tbensonatlcliffburdick
authored andcommitted
Add missing stream to cudaEventRecord in bench apps
1 parent 1cc1d15 commit f4e624e

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

examples/channelize_poly_bench.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ void ChannelizePolyBench(matx::index_t channel_start, matx::index_t channel_stop
9494
cudaStreamSynchronize(stream);
9595

9696
float elapsed_ms = 0.0f;
97-
cudaEventRecord(start);
97+
cudaEventRecord(start, stream);
9898
for (int k = 0; k < NUM_ITERATIONS; k++) {
9999
(output = channelize_poly(input, filter, num_channels, decimation_factor)).run(stream);
100100
}
101-
cudaEventRecord(stop);
101+
cudaEventRecord(stop, stream);
102102
cudaStreamSynchronize(stream);
103103
CUDA_CHECK_LAST_ERROR();
104104
cudaEventElapsedTime(&elapsed_ms, start, stop);

examples/resample_poly_bench.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ void ResamplePolyBench()
115115
cudaStreamSynchronize(stream);
116116

117117
float elapsed_ms = 0.0f;
118-
cudaEventRecord(start);
118+
cudaEventRecord(start, stream);
119119
for (int k = 0; k < NUM_ITERATIONS; k++) {
120120
(output = matx::resample_poly(input, filter, up, down)).run(stream);
121121
}
122-
cudaEventRecord(stop);
122+
cudaEventRecord(stop, stream);
123123
cudaStreamSynchronize(stream);
124124
CUDA_CHECK_LAST_ERROR();
125125
cudaEventElapsedTime(&elapsed_ms, start, stop);

include/matx/transforms/resample_poly.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ inline void resample_poly_impl(OutType &out, const InType &in, const FilterType
137137
MATX_ASSERT_STR(out.Size(i) == in.Size(i), matxInvalidDim, "resample_poly: input/output must have matched batch sizes");
138138
}
139139

140-
const index_t up_size = in.Size(RANK-1) * up;
141-
const index_t outlen = up_size / down + ((up_size % down) ? 1 : 0);
142-
140+
[[maybe_unused]] const index_t up_size = in.Size(RANK-1) * up;
141+
[[maybe_unused]] const index_t outlen = up_size / down + ((up_size % down) ? 1 : 0);
143142
MATX_ASSERT_STR(out.Size(RANK-1) == outlen, matxInvalidDim, "resample_poly: output size mismatch");
144143

145144
const index_t g = gcd(up, down);

0 commit comments

Comments
 (0)