SWDEV-450204 - hipGetProcAddress check for null corrected

Change-Id: Ic34b0d561d3d70f3411a60924a64c3b89954394f


[ROCm/clr commit: 14bcbcc25b]
This commit is contained in:
jiabaxie
2024-03-08 16:29:42 -05:00
کامیت شده توسط Jiabao Xie
والد f77ed12c4d
کامیت 5af8ba8513
3فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
@@ -762,7 +762,7 @@ 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);
hipDriverProcAddressQueryResult* symbolStatus);
hipError_t hipStreamBeginCaptureToGraph(hipStream_t stream, hipGraph_t graph,
const hipGraphNode_t* dependencies,
const hipGraphEdgeData* dependencyData,
@@ -602,11 +602,11 @@ hipError_t hipGetDevicePropertiesR0000(hipDeviceProp_tR0000* prop, int device) {
}
hipError_t hipGetProcAddress(const char* symbol, void** pfn, int hipVersion, uint64_t flags,
hipDriverProcAddressQueryResult* symbolStatus = nullptr) {
hipDriverProcAddressQueryResult* symbolStatus) {
HIP_INIT_API(hipGetProcAddress, symbol, pfn, hipVersion, flags, symbolStatus);
std::string symbolString = symbol;
if(symbol == nullptr || symbolString == "" || *pfn == nullptr){
if(symbol == nullptr || symbolString == "" || pfn == nullptr){
HIP_RETURN(hipErrorInvalidValue);
}
@@ -1729,7 +1729,7 @@ hipError_t hipTexRefGetArray(hipArray_t* pArray, const textureReference* texRef)
}
extern "C" hipError_t hipGetProcAddress(const char* symbol, void** pfn, int hipVersion,
uint64_t flags,
hipDriverProcAddressQueryResult* symbolStatus = nullptr) {
hipDriverProcAddressQueryResult* symbolStatus) {
return hip::GetHipDispatchTable()->hipGetProcAddress_fn(symbol, pfn, hipVersion, flags,
symbolStatus);
}