Skip to content

Replace deprecated nd_item::barrier() with sycl::group_barrier() in accumulators and gemm kernels#3006

Merged
antonwolfy merged 3 commits into
masterfrom
address-deprecation-warning
Jul 23, 2026
Merged

Replace deprecated nd_item::barrier() with sycl::group_barrier() in accumulators and gemm kernels#3006
antonwolfy merged 3 commits into
masterfrom
address-deprecation-warning

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The Intel DPC++ compiler (starting with the 2026.2.0) emits a deprecation warning for the nd_item::barrier() member function:

warning: 'barrier' is deprecated: use sycl::group_barrier() free function
instead [-Wdeprecated-declarations]

Notes on correctness:

  • nd_item::barrier() is a work-group barrier, so it maps to group_barrier(it.get_group(), …), not a sub-group barrier. The surrounding code depends on work-group-wide synchronization of shared-local-memory buffers.
  • The old fence_space::local_space argument controlled which memory was fenced (local only). group_barrier's optional argument is instead a memory_scope; the chosen work_group scope fences both local and global memory across the work-group — a superset of the previous behavior, so it is strictly safe. On the target Intel devices a work-group barrier lowers to the same hardware barrier regardless, so there is no performance impact.

This PR replaces the deprecated member function to use of sycl::group_barrier().

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@antonwolfy antonwolfy added this to the 0.21.0 release milestone Jul 22, 2026
@antonwolfy antonwolfy self-assigned this Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev3=py314h509198e_14 ran successfully.
Passed: 1376
Failed: 1
Skipped: 5

@coveralls

coveralls commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.386%. remained the same — address-deprecation-warning into master

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @antonwolfy

@antonwolfy
antonwolfy merged commit e5b5154 into master Jul 23, 2026
98 of 107 checks passed
@antonwolfy
antonwolfy deleted the address-deprecation-warning branch July 23, 2026 14:00
github-actions Bot added a commit that referenced this pull request Jul 23, 2026
…in accumulators and gemm kernels (#3006)

The Intel DPC++ compiler (starting with the 2026.2.0) emits a
deprecation warning for the `nd_item::barrier()` member function:
> warning: 'barrier' is deprecated: use sycl::group_barrier() free
function
> instead [-Wdeprecated-declarations]

Notes on correctness:
- `nd_item::barrier()` is a **work-group** barrier, so it maps to
`group_barrier(it.get_group(), …)`, not a sub-group barrier. The
surrounding code depends on work-group-wide synchronization of
shared-local-memory buffers.
- The old `fence_space::local_space` argument controlled *which memory*
was fenced (local only). `group_barrier`'s optional argument is instead
a `memory_scope`; the chosen `work_group` scope fences both local and
global memory across the work-group — a superset of the previous
behavior, so it is strictly safe. On the target Intel devices a
work-group barrier lowers to the same hardware barrier regardless, so
there is no performance impact.

This PR replaces the deprecated member function to use of
`sycl::group_barrier()`. e5b5154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants