SWDEV-351966 - Remove hipRegisterTracerCallback from dispatch table

Change-Id: Ib343e2c8414a98c0cee6c60fb74a47bb859d8f45
Этот коммит содержится в:
Anusha GodavarthySurya
2023-12-04 07:09:31 +00:00
коммит произвёл Anusha Godavarthy Surya
родитель afc28b091e
Коммит d347f1d67d
4 изменённых файлов: 5 добавлений и 15 удалений
-3
Просмотреть файл
@@ -634,8 +634,6 @@ typedef hipError_t (*t_hipPointerSetAttribute)(const void* value, hipPointer_att
hipDeviceptr_t ptr);
typedef hipError_t (*t_hipProfilerStart)();
typedef hipError_t (*t_hipProfilerStop)();
typedef void (*t_hipRegisterTracerCallback)(const void* function);
typedef void (*t_hipRegisterTracerId)(uint64_t id);
typedef hipError_t (*t_hipRuntimeGetVersion)(int* runtimeVersion);
typedef hipError_t (*t_hipSetDevice)(int deviceId);
typedef hipError_t (*t_hipSetDeviceFlags)(unsigned flags);
@@ -1212,7 +1210,6 @@ struct HipDispatchTable {
t_hipPointerSetAttribute hipPointerSetAttribute_fn;
t_hipProfilerStart hipProfilerStart_fn;
t_hipProfilerStop hipProfilerStop_fn;
t_hipRegisterTracerCallback hipRegisterTracerCallback_fn;
t_hipRuntimeGetVersion hipRuntimeGetVersion_fn;
t_hipSetDevice hipSetDevice_fn;
t_hipSetDeviceFlags hipSetDeviceFlags_fn;
-2
Просмотреть файл
@@ -534,7 +534,6 @@ hipError_t hipPointerSetAttribute(const void* value, hipPointer_attribute attrib
hipDeviceptr_t ptr);
hipError_t hipProfilerStart();
hipError_t hipProfilerStop();
void hipRegisterTracerCallback(const void* function);
hipError_t hipRuntimeGetVersion(int* runtimeVersion);
hipError_t hipSetDevice(int deviceId);
hipError_t hipSetDeviceFlags(unsigned flags);
@@ -1091,7 +1090,6 @@ void UpdateHipDispatchTable(HipDispatchTable* ptrDispatchTable) {
ptrDispatchTable->hipPointerSetAttribute_fn = hip::hipPointerSetAttribute;
ptrDispatchTable->hipProfilerStart_fn = hip::hipProfilerStart;
ptrDispatchTable->hipProfilerStop_fn = hip::hipProfilerStop;
ptrDispatchTable->hipRegisterTracerCallback_fn = hip::hipRegisterTracerCallback;
ptrDispatchTable->hipRuntimeGetVersion_fn = hip::hipRuntimeGetVersion;
ptrDispatchTable->hipSetDevice_fn = hip::hipSetDevice;
ptrDispatchTable->hipSetDeviceFlags_fn = hip::hipSetDeviceFlags;
+5 -7
Просмотреть файл
@@ -45,13 +45,11 @@ const char* hipKernelNameRefByPtr(const void* host_function, hipStream_t stream)
return (host_function != nullptr) ? PlatformState::instance().getStatFuncName(host_function)
: nullptr;
}
void hipRegisterTracerCallback(const void* function) {
typedef int (*fptr)(activity_domain_t domain, uint32_t operation_id, void* data);
fptr my_fptr = reinterpret_cast<fptr>(const_cast<void*>(function));
activity_prof::report_activity.store(my_fptr, std::memory_order_relaxed);
}
const char* hipApiName(uint32_t id) { return hip_api_name(id); }
} // namespace hip
extern "C" void hipRegisterTracerCallback(int (*function)(activity_domain_t domain,
uint32_t operation_id, void* data)) {
activity_prof::report_activity.store(function, std::memory_order_relaxed);
}
-3
Просмотреть файл
@@ -1280,9 +1280,6 @@ hipError_t hipPointerSetAttribute(const void* value, hipPointer_attribute attrib
}
hipError_t hipProfilerStart() { return hip::GetHipDispatchTable()->hipProfilerStart_fn(); }
hipError_t hipProfilerStop() { return hip::GetHipDispatchTable()->hipProfilerStop_fn(); }
extern "C" void hipRegisterTracerCallback(const void* function) {
return hip::GetHipDispatchTable()->hipRegisterTracerCallback_fn(function);
}
hipError_t hipRuntimeGetVersion(int* runtimeVersion) {
return hip::GetHipDispatchTable()->hipRuntimeGetVersion_fn(runtimeVersion);
}