public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgomp/109875] [OpenMP] nteams-var / OMP_NUM_TEAMS → ICV not passed to the device / default value
Date: Sun, 21 May 2023 18:44:35 +0000	[thread overview]
Message-ID: <bug-109875-4-cBIaDI0NSw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109875-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109875

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:ad0f80d945cc36fbb60fd1e04d90681d4302de8b

commit r14-1026-gad0f80d945cc36fbb60fd1e04d90681d4302de8b
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Sun May 21 20:36:19 2023 +0200

    libgomp: Honor OpenMP's nteams-var ICV as upper limit on num teams
[PR109875]

    The nteams-var ICV exists per device and can be set either via the routine
    omp_set_num_teams or as environment variable (OMP_NUM_TEAMS with optional
    _ALL/_DEV/_DEV_<num> suffix); it is default-initialized to zero. The number
    of teams created is described under the num_teams clause. If the clause is
    absent, the number of teams is implementation defined but at least
    one team must exist and, if nteams-var is positive, at most nteams-var
    teams may exist.

    The latter condition was not honored in a target region before this
    commit, such that too many teams were created.

    Already before this commit, both the num_teams([lower:]upper) clause
    (on the host and in target regions) and, only on the host, the nteams-var
    ICV were honored. And as only one teams is created for host fallback,
    unless the clause specifies otherwise, the nteams-var ICV was and is
    effectively honored.

    libgomp/ChangeLog:

            PR libgomp/109875
            * config/gcn/target.c (GOMP_teams4): Honor nteams-var ICV.
            * config/nvptx/target.c (GOMP_teams4): Likewise.
            * testsuite/libgomp.c-c++-common/teams-nteams-icv-1.c: New test.
            * testsuite/libgomp.c-c++-common/teams-nteams-icv-2.c: New test.
            * testsuite/libgomp.c-c++-common/teams-nteams-icv-3.c: New test.
            * testsuite/libgomp.c-c++-common/teams-nteams-icv-4.c: New test.

  parent reply	other threads:[~2023-05-21 18:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 17:39 [Bug libgomp/109875] New: " burnus at gcc dot gnu.org
2023-05-17  9:47 ` [Bug libgomp/109875] " burnus at gcc dot gnu.org
2023-05-17 10:11 ` burnus at gcc dot gnu.org
2023-05-21 18:44 ` cvs-commit at gcc dot gnu.org [this message]
2023-05-21 18:56 ` burnus at gcc dot gnu.org

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=bug-109875-4-cBIaDI0NSw@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).