SWDEV-351966 - Dispatch table for hip runtime
Change-Id: Ie4a44fa8cf1ff9c152146070bbbf6b0636d4e325
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Anusha Godavarthy Surya
ebeveyn
ae8d3a6a4e
işleme
5e21f0c6bd
@@ -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
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle