From 78aee3d79fc143403e48fb70a4e46a6e3843d24f Mon Sep 17 00:00:00 2001 From: Anusha GodavarthySurya Date: Wed, 3 Jan 2024 14:43:45 +0000 Subject: [PATCH] SWDEV-439637 - Fix undefined symbol error hipTexRefGetArray & hipTexRefGetBorderColor (github id- #3382) Change-Id: Iae1956779e84759f23011151b60a01cef0d0ef32 [ROCm/clr commit: 5303cd2740264b57fd7d51c338b53106ffd11a9a] --- .../clr/hipamd/include/hip/amd_detail/hip_api_trace.hpp | 7 ++++++- projects/clr/hipamd/src/hip_api_trace.cpp | 4 ++++ projects/clr/hipamd/src/hip_table_interface.cpp | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/include/hip/amd_detail/hip_api_trace.hpp b/projects/clr/hipamd/include/hip/amd_detail/hip_api_trace.hpp index 860ccf8e42..ba5ef49011 100644 --- a/projects/clr/hipamd/include/hip/amd_detail/hip_api_trace.hpp +++ b/projects/clr/hipamd/include/hip/amd_detail/hip_api_trace.hpp @@ -907,7 +907,6 @@ typedef hipError_t (*t_hipHccModuleLaunchKernel)(hipFunction_t f, uint32_t globa void** extra, hipEvent_t startEvent, hipEvent_t stopEvent); typedef int (*t_hipGetStreamDeviceId)(hipStream_t stream); - typedef hipError_t (*t_hipDrvGraphAddMemsetNode)(hipGraphNode_t* phGraphNode, hipGraph_t hGraph, const hipGraphNode_t* dependencies, size_t numDependencies, const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx); @@ -940,6 +939,10 @@ typedef hipError_t (*t_hipGraphInstantiateWithParams)(hipGraphExec_t* pGraphExec hipGraphInstantiateParams* instantiateParams); typedef hipError_t (*t_hipExtGetLastError)(); +typedef hipError_t (*t_hipTexRefGetBorderColor)(float* pBorderColor, + const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetArray)(hipArray_t* pArray, const textureReference* texRef); + // HIP Compiler dispatch table struct HipCompilerDispatchTable { size_t size; @@ -1401,4 +1404,6 @@ struct HipDispatchTable { t_hipGraphAddNode hipGraphAddNode_fn; t_hipGraphInstantiateWithParams hipGraphInstantiateWithParams_fn; t_hipExtGetLastError hipExtGetLastError_fn; + t_hipTexRefGetBorderColor hipTexRefGetBorderColor_fn; + t_hipTexRefGetArray hipTexRefGetArray_fn; }; diff --git a/projects/clr/hipamd/src/hip_api_trace.cpp b/projects/clr/hipamd/src/hip_api_trace.cpp index db46319118..cf1dc3f8a7 100644 --- a/projects/clr/hipamd/src/hip_api_trace.cpp +++ b/projects/clr/hipamd/src/hip_api_trace.cpp @@ -759,6 +759,8 @@ hipError_t hipGraphExternalSemaphoresWaitNodeSetParams( hipError_t hipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams* launchParamsList, unsigned int numDevices, unsigned int flags); hipError_t hipExtGetLastError(); +hipError_t hipTexRefGetBorderColor(float* pBorderColor, const textureReference* texRef); +hipError_t hipTexRefGetArray(hipArray_t* pArray, const textureReference* texRef); } // namespace hip namespace hip { @@ -1230,6 +1232,8 @@ void UpdateDispatchTable(HipDispatchTable* ptrDispatchTable) { ptrDispatchTable->hipDrvGraphAddMemsetNode_fn = hip::hipDrvGraphAddMemsetNode; ptrDispatchTable->hipGetDevicePropertiesR0000_fn = hip::hipGetDevicePropertiesR0000; ptrDispatchTable->hipExtGetLastError_fn = hip::hipExtGetLastError; + ptrDispatchTable->hipTexRefGetBorderColor_fn = hip::hipTexRefGetBorderColor; + ptrDispatchTable->hipTexRefGetArray_fn = hip::hipTexRefGetArray; } #if HIP_ROCPROFILER_REGISTER > 0 diff --git a/projects/clr/hipamd/src/hip_table_interface.cpp b/projects/clr/hipamd/src/hip_table_interface.cpp index d90d39f84d..84d714dbe1 100644 --- a/projects/clr/hipamd/src/hip_table_interface.cpp +++ b/projects/clr/hipamd/src/hip_table_interface.cpp @@ -1719,3 +1719,9 @@ extern "C" int hipGetStreamDeviceId(hipStream_t stream) { hipError_t hipExtGetLastError() { return hip::GetHipDispatchTable()->hipExtGetLastError_fn(); } +hipError_t hipTexRefGetBorderColor(float* pBorderColor, const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetBorderColor_fn(pBorderColor, texRef); +} +hipError_t hipTexRefGetArray(hipArray_t* pArray, const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetArray_fn(pArray, texRef); +}