public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/114690] New: OpenMP 'indirect' clause: dynamic image loading/unloading
@ 2024-04-11 10:07 tschwinge at gcc dot gnu.org
  2024-04-11 10:07 ` [Bug libgomp/114690] " tschwinge at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2024-04-11 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114690
           Summary: OpenMP 'indirect' clause: dynamic image
                    loading/unloading
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: openmp
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: burnus at gcc dot gnu.org, jakub at gcc dot gnu.org,
                    kcy at codesourcery dot com
  Target Milestone: ---

The OpenMP 'indirect' clause mapping table is not populated at image load time
(host-side), but upon the first device kernel invocation (device-side:
'build_indirect_map'), and is then immutable.

This is sufficient for a lot of cases, but breaks if additional images are
loaded after the first device kernel invocation (new mappings not added), or if
images get unloaded (stale mappings not retired).

Reference:
<https://inbox.sourceware.org/875y25udf9.fsf@euler.schwinge.homeip.net>
"[PATCH] openmp: Add support for the 'indirect' clause in C/C++", "Also, for my
understanding: [...]" ff.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libgomp/114690] OpenMP 'indirect' clause: dynamic image loading/unloading
  2024-04-11 10:07 [Bug libgomp/114690] New: OpenMP 'indirect' clause: dynamic image loading/unloading tschwinge at gcc dot gnu.org
@ 2024-04-11 10:07 ` tschwinge at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2024-04-11 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
I suggest that in the short term, we at least add a safeguard in the
'GOMP_OFFLOAD_load_image's to error out if 'GOMP_INDIRECT_ADDR_MAP' has already
been set (that should address (a), right?), and in the
'GOMP_OFFLOAD_unload_image's error out if 'GOMP_INDIRECT_ADDR_MAP' has been set
(that should address (b) -- right?).  (I'm assuming that stale mappings being
present may potentially be problematic?)

Those should be no-ops for the presumably common case that either dynamic
loading/unloading of images isn't used at all, or if it is, that no 'indirect'
clauses are actually present.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-11 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-11 10:07 [Bug libgomp/114690] New: OpenMP 'indirect' clause: dynamic image loading/unloading tschwinge at gcc dot gnu.org
2024-04-11 10:07 ` [Bug libgomp/114690] " tschwinge at gcc dot gnu.org

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).