SWDEV-236178 - Reorganizing Platform/Modules code for easy access.

Change-Id: Ie8920260ffc4ff01e44b48af8cec9ea5aed1aa9b


[ROCm/clr commit: 840347f0d0]
This commit is contained in:
kjayapra-amd
2020-05-18 22:40:33 -04:00
committed by Karthik Jayaprakash
parent 3d7612af8d
commit d6ccf1209c
15 changed files with 1312 additions and 1047 deletions
+4 -2
View File
@@ -20,6 +20,7 @@
#include "hip/hip_runtime.h"
#include "hip_internal.hpp"
#include "hip_platform.hpp"
#include "hip_prof_api.h"
// HIP API callback/activity
@@ -44,8 +45,9 @@ const char* hipKernelNameRefByPtr(const void* hostFunction, hipStream_t stream)
DevLogPrintfError("Wrong Device Id: %d \n", deviceId);
return NULL;
}
hipFunction_t func = PlatformState::instance().getFunc(hostFunction, deviceId);
if (func == nullptr) {
hipFunction_t func = nullptr;
hipError_t hip_error = PlatformState::instance().getStatFunc(&func, hostFunction, deviceId);
if (hip_error != hipSuccess) {
return NULL;
}
return hipKernelNameRef(func);