SWDEV-345650 - Solving hipKernelNameRefByPtr Stream Issue
Stream is not important to get the kernel name from Function that can be found in the functions_ map. Change-Id: I164bc3ebcc5552359856e76204d8b124ba0d2f34
This commit is contained in:
committed by
Ammar Elwazir
szülő
4375b9f5b9
commit
fb8690f812
@@ -39,21 +39,11 @@ int hipGetStreamDeviceId(hipStream_t stream) {
|
||||
return (s != nullptr)? s->DeviceId() : ihipGetDevice();
|
||||
}
|
||||
|
||||
const char* hipKernelNameRefByPtr(const void* hostFunction, hipStream_t stream) {
|
||||
const char* hipKernelNameRefByPtr(const void* hostFunction, hipStream_t) {
|
||||
if (hostFunction == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
int deviceId = hipGetStreamDeviceId(stream);
|
||||
if (deviceId == -1) {
|
||||
LogPrintfError("Wrong Device Id: %d \n", deviceId);
|
||||
return NULL;
|
||||
}
|
||||
hipFunction_t func = nullptr;
|
||||
hipError_t hip_error = PlatformState::instance().getStatFunc(&func, hostFunction, deviceId);
|
||||
if (hip_error != hipSuccess) {
|
||||
return NULL;
|
||||
}
|
||||
return hipKernelNameRef(func);
|
||||
return PlatformState::instance().getStatFuncName(hostFunction);
|
||||
}
|
||||
|
||||
hipError_t hipRegisterApiCallback(uint32_t id, void* fun, void* arg) {
|
||||
|
||||
Reference in New Issue
Block a user