Skip to content

Commit

Permalink
Fix a bug in scalar reduction launching kernels with empty domains (#606
Browse files Browse the repository at this point in the history
)
  • Loading branch information
magnatelee authored Sep 26, 2022
1 parent 331c896 commit b0c3dfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cunumeric/execution_policy/reduction/scalar_reduction.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ struct ScalarReductionPolicy<VariantKind::GPU, LG_OP, Tag> {
const LHS& identity,
Kernel&& kernel)
{
if (0 == volume) return;

auto stream = get_cached_stream();

const size_t blocks = (volume + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK;
Expand Down

0 comments on commit b0c3dfd

Please sign in to comment.