SWDEV-437702 - implement hipGetProcAddress

This should be used in place of dlsym or GetProcAddress (linux and windows respectively)

Change-Id: I5501b538e03892e8e5a2282678d848fcaf21d911


[ROCm/clr commit: 0479cdb3dd]
이 커밋은 다음에 포함됨:
jiabaxie 작성하고 Jiabao Xie가 2024-02-08 11:26:02 -05:00를 커밋함
1 부모 fe3c0a3fdc
커밋 b251260e2a
10 파일이 변경됨
+238 -18

검색과 일치하는 파일 없음

+6 -2
파일 보기
@@ -761,6 +761,8 @@ hipError_t hipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams*
hipError_t hipExtGetLastError();
hipError_t hipTexRefGetBorderColor(float* pBorderColor, const textureReference* texRef);
hipError_t hipTexRefGetArray(hipArray_t* pArray, const textureReference* texRef);
hipError_t hipGetProcAddress(const char* symbol, void** pfn, int hipVersion, uint64_t flags,
hipDriverProcAddressQueryResult* symbolStatus = NULL);
} // namespace hip
namespace hip {
@@ -1234,6 +1236,7 @@ void UpdateDispatchTable(HipDispatchTable* ptrDispatchTable) {
ptrDispatchTable->hipExtGetLastError_fn = hip::hipExtGetLastError;
ptrDispatchTable->hipTexRefGetBorderColor_fn = hip::hipTexRefGetBorderColor;
ptrDispatchTable->hipTexRefGetArray_fn = hip::hipTexRefGetArray;
ptrDispatchTable->hipGetProcAddress_fn = hip::hipGetProcAddress;
}
#if HIP_ROCPROFILER_REGISTER > 0
@@ -1251,7 +1254,7 @@ constexpr auto ComputeTableSize(size_t num_funcs) {
return (num_funcs * sizeof(void*)) + sizeof(uint64_t);
}
HIP_DEFINE_DISPATCH_TABLE_INFO(HipDispatchTable, hip, 429)
HIP_DEFINE_DISPATCH_TABLE_INFO(HipDispatchTable, hip, 440)
HIP_DEFINE_DISPATCH_TABLE_INFO(HipCompilerDispatchTable, hip_compiler, 9)
#endif
@@ -1775,8 +1778,9 @@ HIP_ENFORCE_ABI(HipDispatchTable, hipGraphExecExternalSemaphoresSignalNodeSetPar
HIP_ENFORCE_ABI(HipDispatchTable, hipGraphExecExternalSemaphoresWaitNodeSetParams_fn, 436);
HIP_ENFORCE_ABI(HipDispatchTable, hipGraphAddNode_fn, 437);
HIP_ENFORCE_ABI(HipDispatchTable, hipGraphInstantiateWithParams_fn, 438);
HIP_ENFORCE_ABI(HipDispatchTable, hipGetProcAddress_fn, 442)
static_assert(HIP_RUNTIME_API_TABLE_MAJOR_VERSION == 0 && HIP_RUNTIME_API_TABLE_STEP_VERSION == 0,
static_assert(HIP_RUNTIME_API_TABLE_MAJOR_VERSION == 0 && HIP_RUNTIME_API_TABLE_STEP_VERSION == 1,
"If you get this error, add new HIP_ENFORCE_ABI(...) code for the new function "
"pointers and then update this check so it is true");
#endif