Skip to content
Snippets Groups Projects
Commit 0d14e7a7 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Merge branch 'fix_parallel_reduction_size' into 'master'

Fix parallel reduction for size 1

Closes #44

See merge request !94
parents 8574e8ef 202b0f5f
No related branches found
No related tags found
No related merge requests found
......@@ -539,7 +539,7 @@ def realize_reduction(kernel, insn_id_filter=None, unknown_types_ok=True):
new_insn_add_depends_on.add(prev_id)
new_insn_add_no_sync_with.add((prev_id, "any"))
new_insn_add_within_inames.add(stage_exec_iname or base_exec_iname)
new_insn_add_within_inames.add(base_exec_iname or stage_exec_iname)
if nresults == 1:
assert len(acc_vars) == 1
......
......@@ -1198,7 +1198,8 @@ class _ReductionSplitter(RuleAwareIdentityMapper):
return Reduction(expr.operation, tuple(self.inames),
Reduction(expr.operation, tuple(leftover_inames),
self.rec(expr.expr, expn_state),
expr.allow_simultaneous))
expr.allow_simultaneous),
expr.allow_simultaneous)
else:
assert False
else:
......
......@@ -181,7 +181,7 @@ def test_recursive_nested_dependent_reduction(ctx_factory):
# FIXME: Actually test functionality.
@pytest.mark.parametrize("size", [128, 5, 113, 67])
@pytest.mark.parametrize("size", [128, 5, 113, 67, 1])
def test_local_parallel_reduction(ctx_factory, size):
ctx = ctx_factory()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment