Tobias Burnus wrote:
Andrew Stubbs wrote:
On 07/10/2025 11:31, Tobias Burnus wrote:
This patch adds the currently unused static function
'is_integrated_apu'
to libgomp/plugin/plugin-{gcn,nvptx}.c.
While currently not in use ('#if 0'), I'd like to add it already now
as prep work. The idea is to use it to enable self mapping
automatically
be default if mapping it pointless (copying data despite sharing the
same memory controller). [See below for more.]
If going this far, why not make it live? I already posted the libgomp
parts a year ago, and there's not much:
https://patchwork.sourceware.org/project/gcc/patch/[email protected]/
I have now committed (r16-4354-gd2ad7e90834d9c) a slightly
modified version of the patch (as attached):
* I removed the comment about per-device (vs. per-device type)
in light of the patch Andrew mentioned.
* I added a reference to https://gcc.gnu.org/PR115279 as that's
required before we can automatically enable USM for APUs.
Without, map clauses for global variables ('declare target' variables)
are ignored, which leads to wrong code.
This patch is also a prerequisite for the auto-USM part of Andrew's
patch (unless the code has no 'declare target' for variables).
Tobias