Skip to content

Commit

Permalink
Fix barrier issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardcode84 committed Nov 4, 2023
1 parent 8b0d09c commit 95d0441
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions numba_dpex/ocl/oclimpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def barrier_one_arg_impl(context, builder, sig, args):
barrier = _declare_function(
context, builder, "barrier", sig, ["unsigned int"]
)
barrier.attributes.add("noduplicate")
builder.call(barrier, [flags])
return _void_value

Expand All @@ -116,6 +117,7 @@ def barrier_no_arg_impl(context, builder, sig, args):
barrier = _declare_function(
context, builder, "barrier", sig, ["unsigned int"]
)
barrier.attributes.add("noduplicate")
flags = context.get_constant(types.uint32, stubs.GLOBAL_MEM_FENCE)
builder.call(barrier, [flags])
return _void_value
Expand All @@ -138,6 +140,7 @@ def sub_group_barrier_impl(context, builder, sig, args):
barrier = _declare_function(
context, builder, "barrier", sig, ["unsigned int"]
)
barrier.attributes.add("noduplicate")
flags = context.get_constant(types.uint32, stubs.LOCAL_MEM_FENCE)
builder.call(barrier, [flags])
return _void_value
Expand Down

0 comments on commit 95d0441

Please sign in to comment.