[Beignet] [PATCH] Remove global barrier assert.

Dag Lem dag at nimrod.no
Fri Jun 14 03:12:37 PDT 2013


"Zhigang Gong" <zhigang.gong at linux.intel.com> writes:

> Nanhai,
>
> Thanks for the information. I agree that in the same kernel thread, we don't
> need memory fence at all. But for a barrier which is
> to synchronize difference threads, I still think the memory fence is
> required at that case.
>

[...]

Unless the hardware does some implicit synchronization magic, this is
certainly required in order to comply with the OpenCL (1.2) spec:

6.12.8 Synchronization Functions

"The barrier function also queues a memory fence
(reads and writes) to ensure correct ordering of
memory operations to local or global memory."

I also bears repeating that memory has (implicit) load / store
consistency *within* a work item (3.3.1 Memory Consistency), and that
there is *no mechanism* for synchronization *between* work groups (3.4.3
Synchronization).

-- 
Dag


More information about the Beignet mailing list