[libomptarget][amdgpu] Add hidden_heap_v1 kernarg metadata

Code object version 5 adds support of hidden_heap_v1 kernarg
metadata field [1]. It is a global address space pointer to an
initialized memory buffer that conforms to the requirements of the
malloc/free device library V1 version implementation.

[1] https://llvm.org/docs/AMDGPUUsage.html#amdgpu-amdhsa-code-object-kernel-argument-metadata-map-table-v5

Reviewed By: carlo.bertolli

Differential Revision: https://reviews.llvm.org/D123527
This commit is contained in:
Saiyedul Islam 2022-04-11 17:28:07 +00:00
parent a3d69a193a
commit 54a6cc3405
No known key found for this signature in database
GPG Key ID: 060B71C5AF15714F

View File

@ -58,6 +58,7 @@ public:
HiddenCompletionAction,
HiddenMultiGridSyncArg,
HiddenHostcallBuffer,
HiddenHeapV1,
Unknown
};
@ -93,6 +94,7 @@ static const std::map<std::string, KernelArgMD::ValueKind> ArgValueKind = {
{"hidden_multigrid_sync_arg",
KernelArgMD::ValueKind::HiddenMultiGridSyncArg},
{"hidden_hostcall_buffer", KernelArgMD::ValueKind::HiddenHostcallBuffer},
{"hidden_heap_v1", KernelArgMD::ValueKind::HiddenHeapV1}
};
namespace core {
@ -154,6 +156,7 @@ static bool isImplicit(KernelArgMD::ValueKind value_kind) {
case KernelArgMD::ValueKind::HiddenCompletionAction:
case KernelArgMD::ValueKind::HiddenMultiGridSyncArg:
case KernelArgMD::ValueKind::HiddenHostcallBuffer:
case KernelArgMD::ValueKind::HiddenHeapV1:
return true;
default:
return false;