On Wed, Nov 06, 2024 at 03:27:20PM +0000, Andrew Stubbs wrote:
> The chunk size for SIMD loops should be right for the current device; too big
> allocates too much memory, too small is inefficient.  Getting it wrong doesn't
> actually break anything though.
> 
> This patch attempts to choose the optimal setting based on the context.  Both
> host-fallback and device will get the same chunk size, but device performance
> is the most important in this case.
> 
> gcc/ChangeLog:
> 
>       * omp-expand.cc (is_in_offload_region): New function.
>       (omp_adjust_chunk_size): Add pass-through "offload" parameter.
>       (get_ws_args_for): Likewise.
>       (determine_parallel_type): Use is_in_offload_region to adjust call to
>       get_ws_args_for.
>       (expand_omp_for_generic): Likewise.
>       (expand_omp_for_static_chunk): Likewise.

Ok.

        Jakub

Reply via email to