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

Change-Id: Ie8920260ffc4ff01e44b48af8cec9ea5aed1aa9b


[ROCm/hip commit: 20f05c4228]
This commit is contained in:
kjayapra-amd
2020-05-18 22:40:33 -04:00
committato da Karthik Jayaprakash
parent ee30f289b4
commit 37508980de
15 ha cambiato i file con 1312 aggiunte e 1047 eliminazioni
+4 -2
Vedi 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);