Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docstring for group barrier and add todo for group barrier overload #1342

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ def ol_group_barrier(group, fence_scope=MemoryScope.WORK_GROUP):
)

mem_scope = _get_memory_scope(fence_scope)
# TODO: exec_scope needs to be determined based on
# group argument. If group refers to a work_group then,
# exec_scope is MemoryScope.WORK_GROUP.
# If group is sub_group then, exec_scope needs to be
# MemoryScope.SUB_GROUP
exec_scope = get_scope(MemoryScope.WORK_GROUP.value)
spirv_memory_semantics_mask = get_memory_semantics_mask(
MemoryOrder.SEQ_CST.value
Expand Down
6 changes: 1 addition & 5 deletions numba_dpex/kernel_api/barrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ def group_barrier(group: Group, fence_scope=MemoryScope.WORK_GROUP):
The function is modeled after the ``sycl::group_barrier`` function. It
synchronizes work within a group of work items. All the work-items
of the group must execute the barrier construct before any work-item
continues execution beyond the barrier. However, unlike
``sycl::group_barrier`` the numba_dpex function implicitly synchronizes at
the level of a work group and does not allow specifying the group as an
argument. The :func:`sub_group_barrier` function should be used if
synchronization has to be performed only across a sub-group.
continues execution beyond the barrier.

The ``group_barrier`` performs mem-fence operations ensuring that memory
accesses issued before the barrier are not re-ordered with those issued
Expand Down
Loading