SWDEV-351966 - Dispatch table for hip runtime

Change-Id: Ie4a44fa8cf1ff9c152146070bbbf6b0636d4e325
Bu işleme şunda yer alıyor:
Anusha GodavarthySurya
2023-04-21 10:46:05 +00:00
işlemeyi yapan: Anusha Godavarthy Surya
ebeveyn ae8d3a6a4e
işleme 5e21f0c6bd
37 değiştirilmiş dosya ile 4496 ekleme ve 192 silme
+6 -6
Dosyayı Görüntüle
@@ -24,11 +24,10 @@
#include "hip_prof_api.h"
// HIP API callback/activity
namespace hip {
extern const std::string& FunctionName(const hipFunction_t f);
extern "C" {
int hipGetStreamDeviceId(hipStream_t stream) {
if (!hip::isValid(stream)) {
return -1;
@@ -47,11 +46,12 @@ const char* hipKernelNameRefByPtr(const void* host_function, hipStream_t stream)
: nullptr;
}
void hipRegisterTracerCallback(int (*function)(activity_domain_t domain, uint32_t operation_id,
void* data)) {
activity_prof::report_activity.store(function, std::memory_order_relaxed);
void hipRegisterTracerCallback(const void* function) {
typedef int (*fptr)(activity_domain_t domain, uint32_t operation_id, void* data);
fptr my_fptr = reinterpret_cast<fptr>(function);
activity_prof::report_activity.store(my_fptr, std::memory_order_relaxed);
}
const char* hipApiName(uint32_t id) { return hip_api_name(id); }
} // extern "C"
} // namespace hip