[Openmp-commits] [openmp] 54a6cc3 - [libomptarget][amdgpu] Add hidden_heap_v1 kernarg metadata

Saiyedul Islam via Openmp-commits openmp-commits at lists.llvm.org
Tue Apr 12 20:58:44 PDT 2022


Author: Saiyedul Islam
Date: 2022-04-13T03:57:29Z
New Revision: 54a6cc3405607d439cab93d2be2912e36d50ebae

URL: https://github.com/llvm/llvm-project/commit/54a6cc3405607d439cab93d2be2912e36d50ebae
DIFF: https://github.com/llvm/llvm-project/commit/54a6cc3405607d439cab93d2be2912e36d50ebae.diff

LOG: [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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/amdgpu/impl/system.cpp b/openmp/libomptarget/plugins/amdgpu/impl/system.cpp
index 6dd464ec1f7b0..cc722cba55091 100644
--- a/openmp/libomptarget/plugins/amdgpu/impl/system.cpp
+++ b/openmp/libomptarget/plugins/amdgpu/impl/system.cpp
@@ -58,6 +58,7 @@ class KernelArgMD {
     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;


        


More information about the Openmp-commits mailing list