GPUOpen-Tools / gpu_performance_api

GPU Performance API for AMD GPUs
MIT License
250 stars 46 forks source link

GPA_OpenContext for ROCm/hip application #44

Open theRTLmaker opened 4 years ago

theRTLmaker commented 4 years ago

I am a researcher at Univerity of Lisbon (Portugal) and I want to use GPA to profile ROCm/hip applications. I see that there's no example of how to this for ROCm. Can you give me a hint on how should I fill the context to pass to GPA_OpenContext() or a general example of the use of the tool to profile a ROCm kernel?

As for now, my codes looks like this: GPA_ROCm_Context gpaContext; gpaContext.m_pAgent = ???? gpaContext.m_pQueue = ???? GPA_Status status = g_pFuncTable->GPA_OpenContext(&gpaContext, GPA_OPENCONTEXT_ENABLE_HARDWARE_COUNTERS_BIT, &contextId);

As an attachment, I send my example code and a makefile Makefile.txt vectoradd_hip.cpp.txt

Thank you

PLohrmannAMD commented 1 year ago

You've probably graduated by now, and I'm sure you've realized - GPA does not currently support HIP (or ROCm) applications.