Skip to content

Commit

Permalink
[libomptarget][amdgpu] Add hidden_heap_v1 kernarg metadata
Browse files Browse the repository at this point in the history
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
  • Loading branch information
saiislam committed Apr 13, 2022
1 parent a3d69a1 commit 54a6cc3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openmp/libomptarget/plugins/amdgpu/impl/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class KernelArgMD {
HiddenCompletionAction,
HiddenMultiGridSyncArg,
HiddenHostcallBuffer,
HiddenHeapV1,
Unknown
};

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 54a6cc3

Please sign in to comment.