oneDPL icon indicating copy to clipboard operation
oneDPL copied to clipboard

Remove local (in-group) atomic usage from `__parallel_find_or`

Open SergeyKopienko opened this issue 7 months ago • 3 comments

In this PR we remove local (in-group) atomic usage from __parallel_find_or implementation:

  • __found_local now is local variable (for each item);
  • barriers doesn't required anymore;
  • we updates the state of __found_local within one group through __dpl_sycl::__reduce_over_group operation :
                    __found_local = __dpl_sycl::__reduce_over_group(__item_id.get_group(), __found_local,
                                                                    typename _BrickTag::FoundLocalReduceOp{});

where FoundLocalReduceOp is :

  • __dpl_sycl::__minimum (for the __parallel_find_forward_tag);
  • __dpl_sycl::__maximum (for the __parallel_find_backward_tag);
  • __dpl_sycl::__plus (for the __parallel_or_tag).

SergeyKopienko avatar Jul 01 '24 14:07 SergeyKopienko