]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgomp: Enable USM for AMD APUs and MI200 devices
authorTobias Burnus <tburnus@baylibre.com>
Wed, 29 May 2024 13:29:06 +0000 (15:29 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Wed, 29 May 2024 13:29:06 +0000 (15:29 +0200)
commit18f477980c8597fe3dca2c2e8bd533c0c2b17aa6
tree5d0dcb61f7e305df3994ac6250b906373f8937ff
parent4ccb3366ade6ec9493f8ca20ab73b0da4b9816db
libgomp: Enable USM for AMD APUs and MI200 devices

If HSA_AMD_SYSTEM_INFO_SVM_ACCESSIBLE_BY_DEFAULT is true,
all GPUs on the system support unified shared memory. That's
the case for APUs and MI200 devices when XNACK is enabled.

XNACK can be enabled by setting HSA_XNACK=1 as env var for
supported devices; otherwise, if disable, USM code will
use host fallback.

gcc/ChangeLog:

* config/gcn/gcn-hsa.h (gcn_local_sym_hash): Fix typo.

include/ChangeLog:

* hsa.h (HSA_AMD_SYSTEM_INFO_SVM_ACCESSIBLE_BY_DEFAULT): Add
enum value.

libgomp/ChangeLog:

* libgomp.texi (gcn): Update USM handling
* plugin/plugin-gcn.c (GOMP_OFFLOAD_get_num_devices): Handle
USM if HSA_AMD_SYSTEM_INFO_SVM_ACCESSIBLE_BY_DEFAULT is true.
gcc/config/gcn/gcn-hsa.h
include/hsa.h
libgomp/libgomp.texi
libgomp/plugin/plugin-gcn.c