From: Tobias Burnus <tobias@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch] libgomp: Handle OpenMP's reverse offloads
Date: Sat, 10 Dec 2022 09:11:24 +0100 [thread overview]
Message-ID: <f28e745b-21f4-da7c-d298-e82a3f41bc73@codesourcery.com> (raw)
In-Reply-To: <Y5NJw4yPyROk7paS@tucnak>
On 09.12.22 15:44, Jakub Jelinek wrote:
> On Tue, Dec 06, 2022 at 08:45:07AM +0100, Tobias Burnus wrote:
>> [...]
> I think we just shouldn't support libgomp plugins for 32-bit libgomp, only
> host fallback. If you want offloading, use 64-bit host...
(I concur.)
>
>> libgomp: Handle OpenMP's reverse offloads
>>
>> + /* Likeverse for the reverse lookup device->host for reverse offload. */
> Likewise
>
>> + reverse_splay_tree_node rev_array;
> Do we need reverse_splay_tree* stuff in libgomp.h?
> As splay_tree_node is just a pointer, perhaps just
> struct reverse_splay_tree_node_s;
> early and
> struct reverse_splay_tree_node_s *rev_array;
> in libgomp.h and include the extra splay-tree.h only in target.c?
> Unless one needs it anywhere else...
It is used as 'typedef struct reverse_splay_tree_node_s *reverse_splay_tree_node;' in
struct target_mem_desc {
....
reverse_splay_tree_node rev_array;
}
but also as
struct gomp_device_descr
{
...
struct reverse_splay_tree_s mem_map_rev;
}
The latter is
struct reverse_splay_tree_key_s {
/* Address of the device object. */
uint64_t dev;
splay_tree_key k;
};
which in turn needs 'splay_tree_key'.
Thus, I could either commit it as is – or turn the latter also
into a pointer and malloc it. Currently, it is accessed as
mem_map.k.root = NULL for init and later through the splay-tree
functions indirectly.
Thoughts?
Unless there are further comments, I will later commit it as is.
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
next prev parent reply other threads:[~2022-12-10 8:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 7:45 Tobias Burnus
2022-12-07 8:08 ` [Patch] libgomp.texi: Reverse-offload updates (was: [Patch] libgomp: Handle OpenMP's reverse offloads) Tobias Burnus
2022-12-10 8:18 ` Tobias Burnus
2023-01-31 12:21 ` Jakub Jelinek
2022-12-09 14:44 ` [Patch] libgomp: Handle OpenMP's reverse offloads Jakub Jelinek
2022-12-10 8:11 ` Tobias Burnus [this message]
2022-12-10 8:28 ` Jakub Jelinek
2022-12-15 17:34 ` Thomas Schwinge
2022-12-15 17:49 ` Jakub Jelinek
2022-12-15 19:42 ` Tobias Burnus
2022-12-15 20:13 ` Tobias Burnus
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=f28e745b-21f4-da7c-d298-e82a3f41bc73@codesourcery.com \
--to=tobias@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.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).