From: Martin Jambor <mjambor@suse.cz>
To: Thomas Schwinge <thomas@codesourcery.com>,
Frederik Harwath <frederik@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, jakub@redhat.com, tdevries@suse.de,
Andrew Stubbs <ams@codesourcery.com>,
Julian Brown <julian@codesourcery.com>,
Tobias Burnus <tobias@codesourcery.com>
Subject: Re: [PATCH] Add OpenACC 2.6 `acc_get_property' support
Date: Tue, 17 Dec 2019 09:39:00 -0000 [thread overview]
Message-ID: <ri6eex3pap8.fsf@suse.cz> (raw)
In-Reply-To: <87v9qfyiyz.fsf@euler.schwinge.homeip.net>
Hi,
On Tue, Dec 17 2019, Thomas Schwinge wrote:
> On 2019-11-14T16:35:31+0100, Frederik Harwath <frederik@codesourcery.com> wrote:
>> this patch implements OpenACC 2.6 "acc_get_property" and related functions.
>
> [...]
>
>> --- a/libgomp/plugin/plugin-hsa.c
>> +++ b/libgomp/plugin/plugin-hsa.c
>> @@ -699,6 +699,32 @@ GOMP_OFFLOAD_get_num_devices (void)
>> return hsa_context.agent_count;
>> }
>>
>> +/* Part of the libgomp plugin interface. Return the value of property
>> + PROP of agent number N. */
>> +
>> +union gomp_device_property_value
>> +GOMP_OFFLOAD_get_property (int n, int prop)
>> +{
>> + union gomp_device_property_value nullval = { .val = 0 };
>> +
>> + if (!init_hsa_context ())
>> + return nullval;
>
> I'm not familiar with that code, but similar to other plugins,
> 'init_hsa_context' already is called via 'GOMP_OFFLOAD_get_num_devices'
> (and 'GOMP_OFFLOAD_init_device', hmm...), so probably don't need to call
> it here?
I assume you always want to get the number of devices before querying
their properties but OTOH there is no harm in calling the initialization
function.
>> +
>> + switch (prop)
>> + {
>> + case GOMP_DEVICE_PROPERTY_VENDOR:
>> + return (union gomp_device_property_value) { .ptr = "AMD" };
>> + default:
>> + return nullval;
>> + }
>> +}
>
> Not sure if "AMD" is actually correct here -- isn't HSA a
> vendor-independent standard?
>
Yes, it is supposed to be. I think HSA is the correct "vendor" too,
essentially an abbreviation for HSA Foundation.
Thanks,
Martin
next prev parent reply other threads:[~2019-12-17 9:23 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 16:51 [PATCH, og8] " Maciej W. Rozycki
2018-12-05 10:12 ` Chung-Lin Tang
2018-12-05 18:17 ` Maciej W. Rozycki
2018-12-10 9:06 ` Chung-Lin Tang
2018-12-20 14:25 ` Maciej W. Rozycki
2019-01-08 17:42 ` Thomas Schwinge
2019-10-07 18:41 ` Thomas Schwinge
2019-11-05 15:09 ` Harwath, Frederik
2019-11-14 15:41 ` [PATCH] " Frederik Harwath
2019-12-16 23:06 ` Thomas Schwinge
2019-12-17 9:39 ` Martin Jambor [this message]
2019-12-17 9:47 ` Andrew Stubbs
2019-12-20 17:11 ` Harwath, Frederik
2019-12-21 23:01 ` Thomas Schwinge
2019-12-22 22:20 ` Harwath, Frederik
2020-01-10 23:44 ` Thomas Schwinge
2020-01-30 16:14 ` Make OpenACC 'acc_get_property' with 'acc_device_current' work (was: [PATCH] Add OpenACC 2.6 `acc_get_property' support) Thomas Schwinge
2020-02-03 12:16 ` Harwath, Frederik
2020-02-03 14:41 ` Make OpenACC 'acc_get_property' with 'acc_device_current' work Tobias Burnus
2020-01-16 16:03 ` [PATCH] Add OpenACC 2.6 `acc_get_property' support Thomas Schwinge
2020-01-20 14:20 ` Harwath, Frederik
2020-01-23 15:08 ` Thomas Schwinge
2020-01-24 9:36 ` Harwath, Frederik
2020-01-27 14:57 ` Fortran 'acc_get_property' return type (was: [PATCH] Add OpenACC 2.6 `acc_get_property' support) Thomas Schwinge
2020-01-28 15:31 ` [PATCH] Add OpenACC acc_get_property support for AMD GCN Harwath, Frederik
2020-01-28 16:14 ` Andrew Stubbs
2020-01-29 10:10 ` Harwath, Frederik
2020-01-29 11:07 ` Andrew Stubbs
2020-01-29 11:47 ` Harwath, Frederik
2020-01-29 17:58 ` Thomas Schwinge
2020-01-29 18:12 ` Andrew Stubbs
2020-01-30 8:04 ` Harwath, Frederik
2020-01-30 16:28 ` Thomas Schwinge
2020-01-30 16:54 ` Andrew Stubbs
2020-01-31 9:32 ` Thomas Schwinge
2020-01-31 12:32 ` Harwath, Frederik
2020-01-31 14:49 ` Thomas Schwinge
2020-04-29 9:19 ` [PATCH] Add OpenACC 2.6 `acc_get_property' support Thomas Schwinge
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=ri6eex3pap8.fsf@suse.cz \
--to=mjambor@suse.cz \
--cc=ams@codesourcery.com \
--cc=frederik@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=julian@codesourcery.com \
--cc=tdevries@suse.de \
--cc=thomas@codesourcery.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).