From: Tom de Vries <tdevries@suse.de>
To: Andrew Stubbs <ams@codesourcery.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Tobias Burnus <tobias@codesourcery.com>,
Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] nvptx: bump default to PTX 4.1
Date: Wed, 5 Jan 2022 13:45:07 +0100 [thread overview]
Message-ID: <0f545467-f244-f1aa-a71f-66b1fcca5989@suse.de> (raw)
In-Reply-To: <69fe114c-22eb-9cec-41f6-d03695b6fab1@codesourcery.com>
On 1/5/22 11:33, Andrew Stubbs wrote:
> On 05/01/2022 10:24, Tom de Vries wrote:
>> On 12/21/21 12:33, Andrew Stubbs wrote:
>>> On 20/12/2021 15:58, Andrew Stubbs wrote:
>>>> In order to support the %dynamic_smem_size PTX feature is is
>>>> necessary to bump the minimum supported PTX version from 3.1 (~2013)
>>>> to 4.1 (~2014).
>>>
>>> Tobias has pointed out, privately, that the default version is both
>>> documented and encoded in the -mptx option, so I need to fix that too.
>>>
>>> This patch adds -mptx=4.1, sets it as the default, and updates the
>>> documentation accordingly.
>>>
>>> The -mptx=3.1 option is kept for backwards compatibility as an alias
>>> for 4.1. There's no point in actually allowing 3.1 as any program
>>> linked against libgomp will fail (and that's all offloading programs).
>>>
>>> OK for stage 1?
>>
>> Just keep -mptx=3.1 as is, and add -mptx=4.1.
>>
>> AFAIU, there's actually only one file required to have -mptx=4.1, the
>> one using %dynamic_smem_size. Since it's somewhat cumbersome to add
>> flags for a single file, how about:
>> ...
>> diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
>> index d4f1e741b5a..92242697f24 100644
>> --- a/libgomp/configure.tgt
>> +++ b/libgomp/configure.tgt
>> @@ -162,6 +162,7 @@ case "${target}" in
>>
>> nvptx*-*-*)
>> config_path="nvptx accel"
>> + XCFLAGS="$XCFLAGS -mptx=4.1"
>> ;;
>>
>> *-*-rtems*)
>> ...
>> ?
>
> There shouldn't be any need for that as long as the default is correct.
There is no need to change the default, as long as we use this.
> In any case, I'm no expert but doesn't the deferred assembly thing mean
> that the whole project needs to have the correct minimum setting?
>
If your question is whether ptx modules with .version 3.1 and 4.1 can be
linked together, then the answer seems to be yes.
> If the NVPTX maintainer prefers I can leave the 3.1 meaning actually
> 3.1, but that will break any makefiles or build scripts that exist in
> the wild and happen to specify 3.1 explicitly (not that I know any
> reason why they would).
I think you're trying to support a scenario we shouldn't support, by
making things unclear.
Thanks,
- Tom
next prev parent reply other threads:[~2022-01-05 12:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 15:58 [PATCH] libgomp, OpenMP, nvptx: Low-latency memory allocator Andrew Stubbs
2021-12-21 11:33 ` [PATCH] nvptx: bump default to PTX 4.1 Andrew Stubbs
2022-01-05 10:24 ` Tom de Vries
2022-01-05 10:33 ` Andrew Stubbs
2022-01-05 12:45 ` Tom de Vries [this message]
2022-01-05 11:08 ` [PATCH] libgomp, OpenMP, nvptx: Low-latency memory allocator Tom de Vries
2022-01-05 13:04 ` Tom de Vries
2022-01-05 14:36 ` Andrew Stubbs
2022-01-06 9:29 ` Tom de Vries
2022-01-06 17:53 ` Tom de Vries
2022-01-07 14:14 ` Andrew Stubbs
2022-01-13 11:13 ` Andrew Stubbs
2023-02-14 12:54 ` [og12] In 'libgomp/allocator.c:omp_realloc', route 'free' through 'MEMSPACE_FREE' (was: [PATCH] libgomp, OpenMP, nvptx: Low-latency memory allocator) Thomas Schwinge
2023-02-14 15:11 ` Andrew Stubbs
2023-02-16 21:45 ` Thomas Schwinge
2022-01-05 14:21 ` [PATCH] libgomp, OpenMP, nvptx: Low-latency memory allocator Andrew Stubbs
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=0f545467-f244-f1aa-a71f-66b1fcca5989@suse.de \
--to=tdevries@suse.de \
--cc=ams@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=tobias@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).