KhronosGroup / KhronosGroup/OpenCL-Docs

Barrier needed?

Open
#1,423 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
420
Forks
131
Avg merge
5d 13h
Merged PRs (30d)
11

Description

Hey! The original issue was posted on mesa3d repo:

https://gitlab.freedesktop.org/mesa/mesa/-/issues?show=eyJpaWQiOiIxMzYzMSIsImZ1bGxfcGF0aCI6Im1lc2EvbWVzYSIsImlkIjoxMzYxMDh9

The main question is, does the following kernel need the barrier?

```
__kernel void test_barrier(__global int2* a)
{
const int i = get_global_id(0);
a[i].y = i;
barrier(CLK_GLOBAL_MEM_FENCE);
a[i + 1].x = i;
}
```

I feel like OpenCL wants it, but I have not been able to find any documentation about such border case

Contributor guide

Open the contributing guide

Research direction

Start with the linked Mesa issue and the OpenCL barrier specification relevant to the kernel shown. Determine the rule for the two writes and record a clear, authoritative answer in the appropriate OpenCL documentation location; no target file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.