public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus 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: Wed, 17 May 2023 09:47:00 +0000	[thread overview]
Message-ID: <bug-109875-4-P1Csn8fGtJ@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 #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Tested it now also with true offloading.

For AMD GCN, I get:
  host: max_teams: 2
  tgt: max_teams: 3
  num_teams: 120

For nvptx, I get:
  host: max_teams: 2
  tgt: max_teams: 3
  num_teams: 240

And for completeness, for host fallback:
  host: max_teams: 3
  tgt: max_teams: 3
  num_teams: 1

i.e. the ICV is handled correctly. However, the ICV is not honored for the
target region.

By contrast, an explicit 'num_teams(4)' is honored by GCN/nvptx/host fallback
...

 * * *

The spec wording is:
"If the *num_teams* clause is not specified on a construct then the effect is
as if _upper-bound_ was specified as follows. If the value of the nteams-var
ICV is greater than zero, the effect is as if upper-bound was specified to an
implementation-defined value greater than zero but less than or equal to the
value of the nteams-var ICV."

  reply	other threads:[~2023-05-17  9:47 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 ` burnus at gcc dot gnu.org [this message]
2023-05-17 10:11 ` [Bug libgomp/109875] " burnus at gcc dot gnu.org
2023-05-21 18:44 ` cvs-commit at gcc dot gnu.org
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-P1Csn8fGtJ@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).