diff options
author | Tobias Burnus <tburnus@baylibre.com> | 2024-05-29 15:29:06 +0200 |
---|---|---|
committer | Tobias Burnus <tburnus@baylibre.com> | 2024-05-29 15:29:06 +0200 |
commit | 18f477980c8597fe3dca2c2e8bd533c0c2b17aa6 (patch) | |
tree | 5d0dcb61f7e305df3994ac6250b906373f8937ff /gcc | |
parent | 4ccb3366ade6ec9493f8ca20ab73b0da4b9816db (diff) | |
download | gcc-18f477980c8597fe3dca2c2e8bd533c0c2b17aa6.zip gcc-18f477980c8597fe3dca2c2e8bd533c0c2b17aa6.tar.gz gcc-18f477980c8597fe3dca2c2e8bd533c0c2b17aa6.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/gcn/gcn-hsa.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/gcn/gcn-hsa.h b/gcc/config/gcn/gcn-hsa.h index 4611bc5..0322055 100644 --- a/gcc/config/gcn/gcn-hsa.h +++ b/gcc/config/gcn/gcn-hsa.h @@ -80,7 +80,7 @@ extern unsigned int gcn_local_sym_hash (const char *name); writes a new AMD GPU object file and the ABI version needs to be the same. - LLVM <= 17 defaults to 4 while LLVM >= 18 defaults to 5. GCC supports LLVM >= 13.0.1 and only LLVM >= 14 supports version 5. - Note that Fiji is only suppored with LLVM <= 17 as version 3 is no longer + Note that Fiji is only supported with LLVM <= 17 as version 3 is no longer supported in LLVM >= 18. */ #define ABI_VERSION_SPEC "march=fiji:--amdhsa-code-object-version=3;" \ "!march=*|march=*:--amdhsa-code-object-version=4" |