public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Marcel Vollweiler <marcel@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [Patch] OpenMP, libgomp, gimple: omp_get_max_teams, omp_set_num_teams, and omp_{gs}et_teams_thread_limit on offload devices
Date: Mon, 5 Dec 2022 14:50:51 +0100	[thread overview]
Message-ID: <Y433Ozvkty02F0cQ@tucnak> (raw)
In-Reply-To: <5ca00fe3-62cd-1bf1-aef7-949b2cb83b1b@codesourcery.com>

On Thu, Nov 24, 2022 at 03:09:02PM +0100, Marcel Vollweiler wrote:
> gcc/ChangeLog:
> 
> 	* gimplify.cc (optimize_target_teams): Set initial num_teams_upper
> 	to "-2" instead of "1" for non-existing num_teams clause in order to
> 	disambiguate from the case of an existing num_teams clause with value 1.
> 
> libgomp/ChangeLog:
> 
> 	* config/gcn/icv-device.c (omp_get_teams_thread_limit): Added to
> 	allow processing of device-specific values.
> 	(omp_set_teams_thread_limit): Likewise.
> 	(ialias): Likewise.
> 	* config/nvptx/icv-device.c (omp_get_teams_thread_limit): Likewise.
> 	(omp_set_teams_thread_limit): Likewise.
> 	(ialias): Likewise.
> 	* icv-device.c (omp_get_teams_thread_limit): Likewise.
> 	(ialias): Likewise.
> 	(omp_set_teams_thread_limit): Likewise.
> 	* icv.c (omp_set_teams_thread_limit): Removed.
> 	(omp_get_teams_thread_limit): Likewise.
> 	(ialias): Likewise.
> 	* libgomp.texi: Updated documentation for nvptx and gcn corresponding
> 	to the limitation of the number of teams.
> 	* plugin/plugin-gcn.c (limit_teams): New helper function that limits
> 	the number of teams by twice the number of compute units.
> 	(parse_target_attributes): Limit the number of teams on gcn offload
> 	devices.
> 	* target.c (get_gomp_offload_icvs): Added teams_thread_limit_var
> 	handling.
> 	(gomp_load_image_to_device): Added a size check for the ICVs struct
> 	variable.
> 	(gomp_copy_back_icvs): New function that is used in GOMP_target_ext to
> 	copy back the ICV values from device to host.
> 	(GOMP_target_ext): Update the number of teams and threads in the kernel
> 	args also considering device-specific values.
> 	* testsuite/libgomp.c-c++-common/icv-4.c: Fixed an error in the reading
> 	of OMP_TEAMS_THREAD_LIMIT from the environment.
> 	* testsuite/libgomp.c-c++-common/icv-5.c: Extended.
> 	* testsuite/libgomp.c-c++-common/icv-6.c: Extended.
> 	* testsuite/libgomp.c-c++-common/icv-7.c: Extended.
> 	* testsuite/libgomp.c-c++-common/icv-9.c: New test.
> 	* testsuite/libgomp.fortran/icv-5.f90: New test.
> 	* testsuite/libgomp.fortran/icv-6.f90: New test.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* c-c++-common/gomp/target-teams-1.c: Adapt expected values for
> 	num_teams from "1" to "-2" in cases without num_teams clause.
> 	* g++.dg/gomp/target-teams-1.C: Likewise.
> 	* gfortran.dg/gomp/defaultmap-4.f90: Likewise.
> 	* gfortran.dg/gomp/defaultmap-5.f90: Likewise.
> 	* gfortran.dg/gomp/defaultmap-6.f90: Likewise.

Ok, thanks.

	Jakub


      reply	other threads:[~2022-12-05 13:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 16:06 Marcel Vollweiler
2022-06-30 13:16 ` Jakub Jelinek
2022-08-03 12:40   ` Marcel Vollweiler
2022-09-18  8:24     ` Marcel Vollweiler
2022-09-30  9:35       ` Jakub Jelinek
2022-11-24 14:09         ` Marcel Vollweiler
2022-12-05 13:50           ` Jakub Jelinek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y433Ozvkty02F0cQ@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marcel@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).