Skip to content

Commit 54a6cc3

Browse files
committed
[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
1 parent a3d69a1 commit 54a6cc3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

openmp/libomptarget/plugins/amdgpu/impl/system.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class KernelArgMD {
5858
HiddenCompletionAction,
5959
HiddenMultiGridSyncArg,
6060
HiddenHostcallBuffer,
61+
HiddenHeapV1,
6162
Unknown
6263
};
6364

@@ -93,6 +94,7 @@ static const std::map<std::string, KernelArgMD::ValueKind> ArgValueKind = {
9394
{"hidden_multigrid_sync_arg",
9495
KernelArgMD::ValueKind::HiddenMultiGridSyncArg},
9596
{"hidden_hostcall_buffer", KernelArgMD::ValueKind::HiddenHostcallBuffer},
97+
{"hidden_heap_v1", KernelArgMD::ValueKind::HiddenHeapV1}
9698
};
9799

98100
namespace core {
@@ -154,6 +156,7 @@ static bool isImplicit(KernelArgMD::ValueKind value_kind) {
154156
case KernelArgMD::ValueKind::HiddenCompletionAction:
155157
case KernelArgMD::ValueKind::HiddenMultiGridSyncArg:
156158
case KernelArgMD::ValueKind::HiddenHostcallBuffer:
159+
case KernelArgMD::ValueKind::HiddenHeapV1:
157160
return true;
158161
default:
159162
return false;

0 commit comments

Comments
 (0)