public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/100753] New: Implement in_reduction clause on target construct Date: Tue, 25 May 2021 11:20:33 +0000 [thread overview] Message-ID: <bug-100753-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100753 Bug ID: 100753 Summary: Implement in_reduction clause on target construct Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- I think we have two cases. One is in_reduction clause on synchronous target (i.e. without nowait clause), I think that is implementable just by calling GOMP_task_reduction_remap on all map clause addresses that use the in_reduction identifier as base expression and making sure map clause isn't thrown away for them when the original list item is declare target to - the in_reduction clause acts as a privatization clause on the target task. Plus add map(always, tofrom: item) clause. The much harder case is target with nowait clause. Right now task reductions are implemented by having privatized arrays with one element per thread. But for async target the host threads can be doing something else and can update those private copies. So I think for nowait in_reduction(...) we need to create new host private copies for those (initialized with the reduction initializers), map them to device and when the target task is over, map them back from device and at that point combine them into the remapped private reduction var. That will probably mean a new callback invoked from GOMP_PLUGIN_target_task_completion ?
next reply other threads:[~2021-05-25 11:20 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-25 11:20 jakub at gcc dot gnu.org [this message] 2021-06-28 9:46 ` [Bug libgomp/100753] " jakub at gcc dot gnu.org 2021-06-28 13:51 ` burnus at gcc dot gnu.org 2021-10-20 17:06 ` burnus 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-100753-4@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: linkBe 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).