public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99932] OpenACC/nvptx offloading execution regressions starting with CUDA 11.2-era Nvidia Driver 460.27.04
Date: Tue, 25 Jan 2022 15:00:05 +0000	[thread overview]
Message-ID: <bug-99932-4-Q8Va7HdJCc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99932-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #10)
> [ FTR, T400, driver 470.94 ]
> 
> Interestingly, changing the default ptx version to 6.3 makes the minimal
> test-case pass, as well as the full parallel-dims.c
> 
> The only code changes are shfl -> shfl.sync and vote -> vote.sync.
> 

It seems another change is required.

Starting with 6.0, bar.sync maps onto barrier.sync.aligned, where the aligned
means that "all threads in CTA will execute the same barrier instruction. In
conditionally executed code, an aligned barrier instruction should only be used
if it is known that all threads in CTA evaluate the condition identically,
otherwise behavior is undefined."

It's not fully clear what is meant with "the same barrier instruction" or
"condition", but in the case of vector_length > 32, we use:
...
bar.sync %r67,64;
...
where %r67 is a barrier number, 1 for worker 0 and 2 for worker 1 in case of 2
workers.  It may well be that it's invalid to use bar.sync for this, and we
should use barrier.sync instead.

But then there's an isa note:
...
Note: For .target sm_6x or below,
1. barrier instruction without .aligned modifier is equivalent to .aligned
variant and has the same restrictions as of .aligned variant.
...
which seems to imply that we get back barrier.sync.aligned behaviour for sm_6x
and earlier, which would again break vector_length > 32.

  parent reply	other threads:[~2022-01-25 15:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 10:45 [Bug target/99932] New: " tschwinge at gcc dot gnu.org
2021-04-22 13:17 ` [Bug target/99932] " vries at gcc dot gnu.org
2021-04-23  8:35 ` vries at gcc dot gnu.org
2021-04-23 12:49 ` vries at gcc dot gnu.org
2021-04-23 15:45 ` vries at gcc dot gnu.org
2021-04-24 20:27 ` vries at gcc dot gnu.org
2021-04-27  6:58 ` vries at gcc dot gnu.org
2021-12-10  6:46 ` vries at gcc dot gnu.org
2022-01-24  9:59 ` vries at gcc dot gnu.org
2022-01-24 10:04 ` vries at gcc dot gnu.org
2022-01-24 15:46 ` vries at gcc dot gnu.org
2022-01-25 10:42 ` vries at gcc dot gnu.org
2022-01-25 11:02 ` vries at gcc dot gnu.org
2022-01-25 15:00 ` vries at gcc dot gnu.org [this message]
2022-01-26 12:19 ` vries at gcc dot gnu.org
2022-01-26 12:30 ` vries at gcc dot gnu.org
2022-02-02 12:31 ` vries 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-99932-4-Q8Va7HdJCc@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).