Re: [PATCH 1/4] openmp: Tune omp_max_vf for offload targets

2024-11-09 Thread Thomas Schwinge
Hi Andrew! On 2024-11-06T15:27:19+, Andrew Stubbs wrote: > If requested, return the vectorization factor appropriate for the offload > device, if any. > --- a/gcc/omp-general.cc > +++ b/gcc/omp-general.cc > @@ -987,10 +987,11 @@ find_combined_omp_for (tree *tp, int *walk_subtrees, > void *d

Re: [PATCH 1/4] openmp: Tune omp_max_vf for offload targets

2024-11-06 Thread Andrew Stubbs
On 06/11/2024 17:59, Jakub Jelinek wrote: On Wed, Nov 06, 2024 at 05:53:53PM +, Andrew Stubbs wrote: I'm not sure why I didn't see this. Was it bootstrap tested or just built without bootstrap + tested? Otherwise it is just a warning. Apparently I forgot to rerun the bootstrap after maki

Re: [PATCH 1/4] openmp: Tune omp_max_vf for offload targets

2024-11-06 Thread Jakub Jelinek
On Wed, Nov 06, 2024 at 05:53:53PM +, Andrew Stubbs wrote: > I'm not sure why I didn't see this. Was it bootstrap tested or just built without bootstrap + tested? Otherwise it is just a warning. > I'm testing the attached patch. If it makes it to stage3, this is ok for trunk. Just 64U would

Re: [PATCH 1/4] openmp: Tune omp_max_vf for offload targets

2024-11-06 Thread Andrew Stubbs
On 06/11/2024 17:38, Andrew Pinski wrote: + if (ENABLE_OFFLOADING && offload) +{ + for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c;) + { + if (startswith (c, "amdgcn")) + return ordered_max (64, omp_max_vf (false)); This causes a bootstrap failure for m

Re: [PATCH 1/4] openmp: Tune omp_max_vf for offload targets

2024-11-06 Thread Jakub Jelinek
On Wed, Nov 06, 2024 at 09:38:21AM -0800, Andrew Pinski wrote: > > + for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c;) > > + { > > + if (startswith (c, "amdgcn")) > > + return ordered_max (64, omp_max_vf (false)); > > This causes a bootstrap failure for me (and

Re: [PATCH 1/4] openmp: Tune omp_max_vf for offload targets

2024-11-06 Thread Andrew Pinski
On Wed, Nov 6, 2024 at 7:28 AM Andrew Stubbs wrote: > > If requested, return the vectorization factor appropriate for the offload > device, if any. > > This change gives a significant speedup in the BabelStream "dot" benchmark on > amdgcn. > > The omp_adjust_chunk_size usecase is set "false", for

[PATCH 1/4] openmp: Tune omp_max_vf for offload targets

2024-11-06 Thread Andrew Stubbs
If requested, return the vectorization factor appropriate for the offload device, if any. This change gives a significant speedup in the BabelStream "dot" benchmark on amdgcn. The omp_adjust_chunk_size usecase is set "false", for now, but I intend to change that in a follow-up patch. Note that N

Re: [PATCH 1/4] openmp: Tune omp_max_vf for offload targets

2024-11-06 Thread Jakub Jelinek
On Wed, Nov 06, 2024 at 03:27:19PM +, Andrew Stubbs wrote: > If requested, return the vectorization factor appropriate for the offload > device, if any. > > This change gives a significant speedup in the BabelStream "dot" benchmark on > amdgcn. > > The omp_adjust_chunk_size usecase is set "fa