[Beignet] [PATCH] Add memory fence before barrier to support global memory barrier.

Dag Lem dag at nimrod.no
Mon Jun 17 23:21:59 PDT 2013


Dag Lem <dag at nimrod.no> writes:

> I suspect that any problems with local memory may have a different
> cause.
>
> As far as I understand, SLM (shared local memory) can only be allocated
> per half-slice (i.e. 8 EUs for IVB GT2).
>
> In OpenCL, on the other hand, local memory is allocated per work group.
>
> This implies that Beignet can either
>
> a) Always make a work group correspond to a half-slice (inflexible).
> b) Never run more than one work group (<= half-slice) at once (slow).
> c) Subdivide local memory per work group (<= half-slice) (good).
>
> However I suspect that Beignet does none of these, but rather lets all
> work groups share the same local memory. This will lead to different
> work groups stomping on each others' supposedly local memory.
>
> Please apologize if I should be talking nonsense here; my understanding
> of these issues is quite limited :-)

Attempting to clarify, the gist of what I'm trying to convey is that:

* The size of a work group must not exceed a half-slice, in order to
  ensure that a work item can access all local memory within its work
  group.
* SLM must be subdivided per running work group, in order to ensure that
  a work item can only access local memory within its work group.

-- 
Dag


More information about the Beignet mailing list