[Libclc-dev] [PATCH 1/3] Implement wait_group_events builtin v2

Hilloulin Damien damien.hilloulin at supelec.fr
Tue Sep 30 04:25:25 PDT 2014


Le 29/09/2014 17:22, Jeroen Ketema a écrit :
> On 24 Sep 2014, at 17:23, Jan Vesely <jan.vesely at rutgers.edu> wrote:
>
>> On Wed, 2014-09-24 at 11:00 +0100, Jeroen Ketema wrote:
>>> This looks good, but I think it suffices to use a barrier with an empty
>>> set of flags, as the function only requires the copy to have completed.
>>> Not that every memory operation arising from the copy has been
>>> committed, as I wrote before.
>>>
>>> The above is provided that a barrier call is not removed completely in
>>> case of an empty set of flags, which I recall is currently the case for
>>> R600. I think there was a patch for that at some point; not sure what
>>> happened to that patch though.
>> if you are referring to [0] and the discussion that stemmed from it, it
>> never got reviewed.
> I was referring to the more recent:
>
>    http://www.pcc.me.uk/pipermail/libclc-dev/2014-August/000586.html
>
> Although the also had some issues.
>
> Jeroen
Just to let you know, I had not much time to devote to this in the last 
two months because spare-time have been a really scarce resource (I 
moved to switzerland, finished an intership, started a new one, became a 
graduate student, etc: that kind of stuff...). But I don't give up, and 
hope that I will be able to continue my work on that because this is 
really important.

Regards,
Damien.
>> I agree with your conclusion that we need to extend fence with AS
>> argument to get this done properly. But it looked like too big of a task
>> at that time, so I did not push it further.
>>
>> I still plan to return to it (unless someone beats me to it), but right
>> now there are things higher on my TODO list (Mostly to familiarize
>> myself with the memory code) before getting back to fences.
>>
>> sorry that I left that discussion in limbo,
>> jan
>>
>> [0] http://www.pcc.me.uk/pipermail/libclc-dev/2014-April/000284.html
>>
>>
>>> Jeroen
>>>
>>> On 24 Sep 2014, at 01:42, Tom Stellard <thomas.stellard at amd.com> wrote:
>>>
>>>> This is a simple default implemetation which just calls barrier().
>>>>
>>>> v2:
>>>> - Only call barrier() once.
>>>> ---
>>>> generic/include/clc/async/wait_group_events.h | 1 +
>>>> generic/include/clc/clc.h                     | 1 +
>>>> generic/lib/SOURCES                           | 1 +
>>>> generic/lib/async/wait_group_events.cl        | 5 +++++
>>>> 4 files changed, 8 insertions(+)
>>>> create mode 100644 generic/include/clc/async/wait_group_events.h
>>>> create mode 100644 generic/lib/async/wait_group_events.cl
>>>>
>>>> diff --git a/generic/include/clc/async/wait_group_events.h b/generic/include/clc/async/wait_group_events.h
>>>> new file mode 100644
>>>> index 0000000..799efa0
>>>> --- /dev/null
>>>> +++ b/generic/include/clc/async/wait_group_events.h
>>>> @@ -0,0 +1 @@
>>>> +void wait_group_events(int num_events, event_t *event_list);
>>>> diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
>>>> index b8c1cb9..0dccf53 100644
>>>> --- a/generic/include/clc/clc.h
>>>> +++ b/generic/include/clc/clc.h
>>>> @@ -138,6 +138,7 @@
>>>>
>>>> /* 6.11.10 Async Copy and Prefetch Functions */
>>>> #include <clc/async/prefetch.h>
>>>> +#include <clc/async/wait_group_events.h>
>>>>
>>>> /* 6.11.11 Atomic Functions */
>>>> #include <clc/atomic/atomic_add.h>
>>>> diff --git a/generic/lib/SOURCES b/generic/lib/SOURCES
>>>> index e4ba1d1..cefef94 100644
>>>> --- a/generic/lib/SOURCES
>>>> +++ b/generic/lib/SOURCES
>>>> @@ -1,4 +1,5 @@
>>>> async/prefetch.cl
>>>> +async/wait_group_events.cl
>>>> atomic/atomic_impl.ll
>>>> cl_khr_global_int32_base_atomics/atom_add.cl
>>>> cl_khr_global_int32_base_atomics/atom_dec.cl
>>>> diff --git a/generic/lib/async/wait_group_events.cl b/generic/lib/async/wait_group_events.cl
>>>> new file mode 100644
>>>> index 0000000..05c9d58
>>>> --- /dev/null
>>>> +++ b/generic/lib/async/wait_group_events.cl
>>>> @@ -0,0 +1,5 @@
>>>> +#include <clc/clc.h>
>>>> +
>>>> +_CLC_DEF void wait_group_events(int num_events, event_t *event_list) {
>>>> +  barrier(CLK_LOCAL_MEM_FENCE | CLK_GLOBAL_MEM_FENCE);
>>>> +}
>>>> -- 
>>>> 1.8.5.5
>>>>
>>>>
>>>> _______________________________________________
>>>> Libclc-dev mailing list
>>>> Libclc-dev at pcc.me.uk
>>>> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
>>>
>>> _______________________________________________
>>> Libclc-dev mailing list
>>> Libclc-dev at pcc.me.uk
>>> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
>> -- 
>> Jan Vesely <jan.vesely at rutgers.edu>
>
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at pcc.me.uk
> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev





More information about the Libclc-dev mailing list