From f4ef34f7e94875e656707a790ca30f15e55a525f Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 5 Jul 2018 20:29:27 -0400
Subject: [PATCH] P4 to Git Change 1576872 by skudchad@skudchad_rocm on
2018/07/05 20:20:21
SWDEV-145570 - [HIP] - Add hipMalloc3D to linker symtable.
- Add structure for hipFuncGetAttributes
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#6 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#6 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#11 edit
[ROCm/hip commit: e143868b47f65d9a5f114c32f9c6434cebc86705]
---
projects/hip/api/hip/hip_hcc.def.in | 2 ++
projects/hip/api/hip/hip_hcc.map.in | 39 ++++++++++++++++-------------
projects/hip/api/hip/hip_module.cpp | 7 ++++++
3 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/projects/hip/api/hip/hip_hcc.def.in b/projects/hip/api/hip/hip_hcc.def.in
index bb9c179d3b..81f51c34f7 100644
--- a/projects/hip/api/hip/hip_hcc.def.in
+++ b/projects/hip/api/hip/hip_hcc.def.in
@@ -68,6 +68,7 @@ hipIpcCloseMemHandle
hipIpcGetMemHandle
hipIpcOpenMemHandle
hipMalloc
+hipMalloc3D
hipMalloc3DArray
hipMallocArray
hipMallocHost
@@ -108,6 +109,7 @@ hipModuleLoad
hipModuleLoadData
hipModuleLoadDataEx
hipModuleUnload
+hipFuncGetAttributes
hipPeekAtLastError
hipPointerGetAttributes
hipProfilerStart
diff --git a/projects/hip/api/hip/hip_hcc.map.in b/projects/hip/api/hip/hip_hcc.map.in
index 452f260534..4114cfe1d9 100644
--- a/projects/hip/api/hip/hip_hcc.map.in
+++ b/projects/hip/api/hip/hip_hcc.map.in
@@ -69,6 +69,7 @@ global:
hipIpcGetMemHandle;
hipIpcOpenMemHandle;
hipMalloc;
+ hipMalloc3D;
hipMalloc3DArray;
hipMallocArray;
hipMallocHost;
@@ -109,6 +110,7 @@ global:
hipModuleLoadData;
hipModuleLoadDataEx;
hipModuleUnload;
+ hipFuncGetAttributes;
hipPeekAtLastError;
hipPointerGetAttributes;
hipProfilerStart;
@@ -137,25 +139,26 @@ global:
hip_impl::hipLaunchKernelGGLImpl*;
hipCreateTextureObject*;
hipDestroyTextureObject*;
- hipGetTextureObjectResourceDesc;
- hipGetTextureObjectResourceViewDesc;
- hipGetTextureObjectTextureDesc;
- hipBindTexture;
- hipBindTexture2D;
- hipBindTextureToArray;
- hipBindTextureToMipmappedArray;
- hipUnbindTexture;
- hipGetChannelDesc;
- hipGetTextureAlignmentOffset;
- hipGetTextureReference;
- hipTexRefSetFormat;
- hipTexRefSetFlags;
- hipTexRefSetFilterMode;
- hipTexRefSetAddressMode;
- hipTexRefSetArray;
- hipTexRefSetAddress;
- hipTexRefSetAddress2D;
+ hipGetTextureObjectResourceDesc*;
+ hipGetTextureObjectResourceViewDesc*;
+ hipGetTextureObjectTextureDesc*;
+ hipBindTexture*;
+ hipBindTexture2D*;
+ hipBindTextureToArray*;
+ hipBindTextureToMipmappedArray*;
+ hipUnbindTexture*;
+ hipGetChannelDesc*;
+ hipGetTextureAlignmentOffset*;
+ hipGetTextureReference*;
+ hipTexRefSetFormat*;
+ hipTexRefSetFlags*;
+ hipTexRefSetFilterMode*;
+ hipTexRefSetAddressMode*;
+ hipTexRefSetArray*;
+ hipTexRefSetAddress*;
+ hipTexRefSetAddress2D*;
hipCreateChannelDesc*;
+ ihipBindTextureImpl*;
ihipBindTextureToArrayImpl*;
hipHccGetAccelerator*;
hipHccGetAcceleratorView*;
diff --git a/projects/hip/api/hip/hip_module.cpp b/projects/hip/api/hip/hip_module.cpp
index 435fe53af8..6831711a9a 100644
--- a/projects/hip/api/hip/hip_module.cpp
+++ b/projects/hip/api/hip/hip_module.cpp
@@ -130,6 +130,13 @@ hipError_t hipModuleGetFunction(hipFunction_t *hfunc, hipModule_t hmod, const ch
return hipSuccess;
}
+hipError_t hipFuncGetAttributes(hipFuncAttributes* attr, const void* func)
+{
+ HIP_INIT_API(attr, func);
+
+ return hipErrorInvalidDeviceFunction;
+}
+
hipError_t hipModuleLaunchKernel(hipFunction_t f,
uint32_t gridDimX, uint32_t gridDimY, uint32_t gridDimZ,
uint32_t blockDimX, uint32_t blockDimY, uint32_t blockDimZ,