Giter Club home page Giter Club logo

gpu_performance_api's People

Contributors

amitprakash07 avatar cal3d avatar chesik-amd avatar eelliott-amd avatar jcortell68 avatar jdrouan-goog avatar luochenhuan avatar plohrmannamd avatar roobre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gpu_performance_api's Issues

example of opencl

Hi,
Is there any example to show how to use this tool with a OpenCL application?

Best,
Trinayan

GPA_OpenContext for ROCm/hip application

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

Does GPUPerfAPI supports Ryzen 6000 series for all RDNA2 perf. counters and Ryzen 5 4600H for all vega perf. counters?

Hello.

I am trying to profile graphic workloads with AMD tools in Lap top. The GPU metrics I am mostly intersted in is L1/L2/L3 cache hit/miss count.

I want to double check that which GPU performance counter is provided in Ryzen 6000 series and Ryzen 5 4600H through GPUPerfAPI.

  1. GPUPerfAPI document says L1/L2 CacheHit/Miss Count is provided in GCN2 and vega architecutre. Does it still hold for integrated GPU like Radeon 660M in Ryzen 6000 series and Ryzen 5 4600H with Radeon™ Vega Graphics?

  2. Lastly if there are other APUs which provide L1/L2/L3 cache hit/miss count, it would be really helpful.

Thank you very much.

Sub-workload counter granularity

Hi, first of all thanks for publishing this library!

Looking trough the API I'm wondering if there is the possibility to sample workloads on a smaller granularity? If I understand it correctlt, it's currently only possible to get samples per draw/dispatch call for example but not possible to get information about the individual wavefronts in a similiar fashion and granularity as the Radeon GPU profiler (wavefront occupancy)?

Cheers

Documentation Typo

On page 38 of the documentation, under the subtitle "Get the Number of Passes Required for the Currently Enabled Set of Counters" appears "GPA_GetNumCounters". I believe that this should be "GPA_GetPassCount".

build error on Ubuntu 18.04.03 LTS

I ran the following:

python PreBuild.py 
cd CMakeBuild/x64/debug
make

I get build errors including:

[ 73%] Linking CXX shared library ../../../../../Output/release/libGPUPerfAPIGL.so
[ 73%] Built target GPUPerfAPIGL
Scanning dependencies of target GPUPerfAPIVK
[ 73%] Building CXX object Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/VkCommandListSwQueries.cpp.o
In file included from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h:19:0,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkSoftwareCountersResults.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSWQueryGroup.h:12,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.h:13,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.cpp:9:
/home/pemgithub/pemCode/GPUOpen/GPA/../Common/Src/AmdVkExt/vk_amd_shader_core_properties2.h:59:16: error: redefinition of ‘struct VkPhysicalDeviceShaderCoreProperties2AMD’
 typedef struct VkPhysicalDeviceShaderCoreProperties2AMD {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/vulkan/vulkan.h:21:0,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkSoftwareCountersResults.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSWQueryGroup.h:12,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.h:13,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.cpp:9:
/usr/include/vulkan/vulkan_core.h:9569:16: note: previous definition of ‘struct VkPhysicalDeviceShaderCoreProperties2AMD’
 typedef struct VkPhysicalDeviceShaderCoreProperties2AMD {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h:19:0,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkSoftwareCountersResults.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSWQueryGroup.h:12,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.h:13,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.cpp:9:
/home/pemgithub/pemCode/GPUOpen/GPA/../Common/Src/AmdVkExt/vk_amd_shader_core_properties2.h:64:3: error: conflicting declaration ‘typedef int VkPhysicalDeviceShaderCoreProperties2AMD’
 } VkPhysicalDeviceShaderCoreProperties2AMD;
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/vulkan/vulkan.h:21:0,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkSoftwareCountersResults.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSWQueryGroup.h:12,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.h:13,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.cpp:9:
/usr/include/vulkan/vulkan_core.h:9574:3: note: previous declaration as ‘typedef struct VkPhysicalDeviceShaderCoreProperties2AMD VkPhysicalDeviceShaderCoreProperties2AMD’
 } VkPhysicalDeviceShaderCoreProperties2AMD;
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/build.make:62: recipe for target 'Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/VkCommandListSwQueries.cpp.o' failed
make[2]: *** [Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/VkCommandListSwQueries.cpp.o] Error 1
CMakeFiles/Makefile2:420: recipe for target 'Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/all' failed
make[1]: *** [Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Navi Vertex Shader counters read 0

After integrating GPA into a custom OpenGL based engine, it appears that on Navi (specifically a 5700XT Anniversary Edition), the VSVALUInstCount, VSSALUInstCount and associated Busy and BusyCycles counters always read 0. After doing some digging, it appears that the GS0 set of hardware counters might contain these and related values, which I'm assuming is due to how Navi cards support mesh shaders.
Thus, my question is, is this assumption correct? Is this a bug in GPA regarding mapping hardware counter names to the human readable counter names?
I realize that these values being inaccurate is a known issue, however a reading of 0 is clearly not representative of performance.

build.sh(s) are not executable

On Linux, build.sh files should be set executable, otherwise must "bash build.sh", which is OK but not what the documentation says.

ABI Incompatible Use of Bool

Hi,

I noticed that within GPUPerfAPITypes.h the following code appears:

#ifndef __cplusplus typedef gpa_uint8 bool; #endif

I am concerned that this will introduce a differently sized type between C and C++, and will therefore introduce ABI issues into the shared library. In my opinion, the bool type should not be used anywhere that ABI must be maintained, so it would be best if this was fixed to be an integer type only.

GPA is not library friendly

GPA usage of CMake is very awkward making it difficult to simply include GPA into an existing large project by setting variables and then calling add_subdirectory. Currently doing so causes the build process to produce binary paths that can't be found.

Documentation Issue

On page 31 of the PDF documentation, GPA_GetCounterDescription has a GPA_Type argument, but the header specifies the argument should be a const char**.

macOS Version?

Hi,

Would it be possible to compile and use this API on macOS?

Thanks and regards,
Thierry

When is the correct time to call GpaCopySecondarySamples in Vulkan?

The document only states that for secondary command buffer we need to call this, but didn't state when is the correct time to call this. Should I call it after the vkCmdExecuteCommands for primary command buffer or vkEndCommandBuffer or any other places? Is there an example for this?

Fresh pull, Common updated, build failed: could not open include files

I hate to be "that guy" but I would have thought following the readme would result in an operational build.

Build output:

1>------ Build started: Project: GPUPerfAPIDX, Configuration: Debug x64 ------
2>------ Skipped Build: Project: Documentation, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
3>------ Build started: Project: GPUPerfAPICounterGenerator, Configuration: Debug x64 ------
1> DXUtils.cpp
3> GPACounterGeneratorBase.cpp
1>c:\users\god\workspace\ext\gpa-master\src\gpuperfapidx\dxUtils.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGeneratorCommon.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPACounterGeneratorCommon.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGeneratorDX11.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGeneratorDX11Base.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGeneratorDX11NonAMD.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGeneratorDX12.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGeneratorGL.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGeneratorHSA.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGeneratorSchedulerManager.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPACounterGeneratorSchedulerManager.h(16): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterSchedulerBase.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAICounterAccessor.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterSchedulerCL.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAICounterAccessor.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterSchedulerDX11.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterSchedulerDX12.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAICounterAccessor.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterSchedulerGL.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAICounterAccessor.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterSchedulerHSA.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAICounterAccessor.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPAInternalCountersFiji.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPAInternalCountersGfx6.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPAPublicCounters.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> GPASplitCountersConsolidatedDX12.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> GPASwCounterManager.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> Generating Code...
3> Compiling...
3> InternalCountersCLGfx6.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersCLGfx7.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersCLGfx8.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersDX11Gfx6.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersDX11Gfx7.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersDX11Gfx8.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersGLGfx6.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersGLGfx7.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersGLGfx8.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersHSAGfx7.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> InternalCountersHSAGfx8.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> PublicCounterDefsCLGfx6.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> PublicCounterDefsCLGfx7.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> PublicCounterDefsCLGfx8.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> GPACounterGeneratorCL.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAInternalCounter.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> GPACounterGenerator.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAICounterAccessor.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
3> PublicCounterDefsDX11Gfx6.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> PublicCounterDefsDX11Gfx7.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> PublicCounterDefsDX11Gfx8.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> PublicCounterDefsGLGfx6.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> Generating Code...
3> Compiling...
3> PublicCounterDefsGLGfx7.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> PublicCounterDefsGLGfx8.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> PublicCounterDefsHSAGfx7.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> PublicCounterDefsHSAGfx8.cpp
3>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAPublicCounters.h(12): fatal error C1083: Cannot open include file: 'GPUPerfAPIOS.h': No such file or directory
3> Generating Code...
4>------ Build started: Project: GPUPerfAPICounters, Configuration: Debug x64 ------
5>------ Build started: Project: GPUPerfAPIGL, Configuration: Debug x64 ------
6>------ Build started: Project: GPUPerfAPIGLES, Configuration: Debug x64 ------
7>------ Build started: Project: GPUPerfAPICL, Configuration: Debug x64 ------
5> GLPerfMonitorCache.cpp
4> GPUPerfAPICounters.cpp
4>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicountergenerator\GPAICounterAccessor.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
8>------ Build started: Project: GPUPerfAPIUnitTests, Configuration: Debug x64 ------
6> GLPerfMonitorCache.cpp
7> CLPerfCounterAMDExtension.cpp
7>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicl\CLRTModuleLoader.h(12): fatal error C1083: Cannot open include file: 'APIRTModuleLoader.h': No such file or directory
7> CLPerfCounterBlock.cpp
8>LINK : fatal error LNK1104: cannot open file 'C:\Users\god\Workspace\Ext\GPA-master\Output\Debug\bin\GPUPerfAPICounterGenerator-x64-d.lib'
9>------ Build started: Project: GPUPerfAPIDX12, Configuration: Debug x64 ------
5>....\Src\GPUPerfAPIGL\GLPerfMonitorCache.cpp(10): fatal error C1083: Cannot open include file: 'Logging.h': No such file or directory
5> GPUPerfAPIGL.cpp
7>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicl\CLRTModuleLoader.h(12): fatal error C1083: Cannot open include file: 'APIRTModuleLoader.h': No such file or directory
7> GPUPerfAPICL.cpp
5>c:\users\god\workspace\ext\gpa-master\src\gpuperfapigl../GPUPerfAPICounterGenerator/GPACounterGenerator.h(14): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
5> Generating Code...
7>c:\users\god\workspace\ext\gpa-master\src\gpuperfapicl../GPUPerfAPICounterGenerator/GPACounterGenerator.h(14): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
7> Generating Code...
6>....\Src\GPUPerfAPIGL\GLPerfMonitorCache.cpp(10): fatal error C1083: Cannot open include file: 'Logging.h': No such file or directory
9> DX12CommandListSwQueries.cpp
6> GPUPerfAPIGL.cpp
9>....\Src\GPUPerfAPIDX12\DX12CommandListSwQueries.cpp(8): fatal error C1083: Cannot open include file: 'Logging.h': No such file or directory
6>c:\users\god\workspace\ext\gpa-master\src\gpuperfapigl../GPUPerfAPICounterGenerator/GPACounterGenerator.h(14): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
9> DX12CommandListSWQueryGroup.cpp
6> Generating Code...
9>c:\users\god\workspace\ext\gpa-master\src\gpuperfapidx12\DX12CommandListSWQueryGroup.h(11): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
9> DX12CounterDataRequestProxy.cpp
9>c:\users\god\workspace\ext\gpa-master\src\gpuperfapidx12\DX12DataRequest.h(11): fatal error C1083: Cannot open include file: 'GPADataRequest.h': No such file or directory
9> DX12DataRequest.cpp
9>c:\users\god\workspace\ext\gpa-master\src\gpuperfapidx12\DX12DataRequest.h(11): fatal error C1083: Cannot open include file: 'GPADataRequest.h': No such file or directory
9> DX12SoftwareCounterDataRequest.cpp
9>c:\users\god\workspace\ext\gpa-master\src\gpuperfapidx12\DX12DataRequest.h(11): fatal error C1083: Cannot open include file: 'GPADataRequest.h': No such file or directory
9> DX12Utils.cpp
9>c:\users\god\workspace\ext\gpa-master\src\gpuperfapidx12\DX12Utils.h(13): fatal error C1083: Cannot open include file: 'GPUPerfAPITypes.h': No such file or directory
9> GPAContextStateDX12.cpp
9>c:\users\god\workspace\ext\gpa-master\src\gpuperfapidx12\GPAContextStateDX12.h(17): fatal error C1083: Cannot open include file: 'GPAContextState.h': No such file or directory
9> GPUPerfAPIDX12.cpp
9>....\Src\GPUPerfAPIDX12\GPUPerfAPIDX12.cpp(11): fatal error C1083: Cannot open include file: 'GPUPerfAPIImp.h': No such file or directory
9> Generating Code...
========== Build: 0 succeeded, 8 failed, 2 up-to-date, 1 skipped ==========

VS2015 SLN and Projects Fail to Open due to Incorrect Property Path

This is incorrect, and causes all the projects to fail to load:
GPA-master\GPUPerfAPI\Build\VS2015\GPA-Common.props(5,9): The imported project "GPA-master\Common\Src\Vsprops\Global-Common.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

The file is actually in:
"GPA-master\GPUPerfAPI\Build\VS2015\GPA-Common.props"

Actually, it looks like most of the *.props referenced are missing instead of just incorrect paths.

Build failure

When I execute build.sh It succeeds up to a point and then fails as seen below. What can be done to resolve this issue?
"
Build GPUPerfAPI-Common, 64-bit...
Build GPUPerfAPI-Common, 32-bit...
Build DeviceInfo, 64-bit...
Build DeviceInfo, 32-bit...
Build GPUPerfAPICounterGenerator, 64-bit...
Failed to build GPUPerfAPICounterGenerator, 64 bit "

Counter nanoseconds do not correspond to Vulkan pipeline statistics

The documentation and the code both state "nanoseconds" for various derived counters. This doesn't seem to be correct when compared to Vulkan's pipeline statistics. A sample profiling primitive assembly shows the following with GPA:
GPUTime = 2489.508102
ExecutionDuration = 2489.076102
ExecutionStart = 6431344343.079865
ExecutionEnd = 6431349323.608068

The exact same command buffer shows:
GPU Time = 3.411704 (ms)
GPU Start Time = 8822159.163976 (ms)
GPU End Time = 8822162.575679 (ms)
This is worked out by multiplying the timestamp query with the device's timestampPeriod and then converting nanoseconds to milliseconds.

Using start/end time as hint, the time unit that makes the most sense for GPA's values is possibly microseconds.

Am I somehow misinterpreting this?

Southern Islands support

Hello,

Thanks for the work you have done here, GPA is a really nice library. I see that you have added Volcanic Islands support in a recent release, and I was wondering if Southern Islands support for Vulkan is somewhere near in the roadmap.

I certainly know it's a kind of old architecture, but some GPUs using it (like E8860) are being actively used in the embedded/realtime world, so we would really appreciate support for them.

Thanks in advance for your time

GPA seems to be incompatible with Vulkan 1.1.73.0

I downloaded GPA for Windows and proceeded with installation guided by manual. After UpdateCommon.py script finished the building stage was failed for GPUPerfAPIVK due to struct redefinition.
The error is:

1>VkGPAImplementor.cpp
1>c:\users\igazizov\downloads\gpa\common\src\amdvkext\vk_amd_shader_core_properties.h(45): error C2011: 'VkPhysicalDeviceShaderCorePropertiesAMD': 'struct' type redefinition
1>c:\vulkansdk\1.1.73.0\include\vulkan\vulkan_core.h(7416): note: see declaration of 'VkPhysicalDeviceShaderCorePropertiesAMD'
1>c:\users\igazizov\downloads\gpa\gpa-master\src\gpuperfapivk\vkgpaimplementor.cpp(56): error C2079: 'shaderCorePropertiesAMD' uses undefined struct 'VkPhysicalDeviceShaderCorePropertiesAMD'

As it turned out, VkPhysicalDeviceShaderCorePropertiesAMD structure in vk_amd_shader_core_properties.h is the same as in vulkan_core.h. That is why the error is present.

I commented out the structure in vk_amd_shader_core_properties.h and managed to build the project. The issue might be in the difference between new and old versions of Vulkan API. I am submitting the issue just to confirm this assumption.

Thank you in advance,
Ilias

Where is DeviceInfo.h?

... and other source files for ../../Src/DeviceInfo/?

root@rig-AMD:/opt/GPA/Build/Linux# bash ./build.sh 
Build GPUPerfAPI, 64-bit...
Failed to build GPUPerfAPI, 64 bit

root@rig-AMD:/opt/GPA/Build/Linux# tail GPUPerfAPI_Build.log 
In file included from ../GPUPerfAPI-Common/IGPAContext.h:12:0,
             from ../GPUPerfAPI-Common/GPAContext.h:17,
             from ../GPUPerfAPI-Common/GPAPass.h:18,
             from ../GPUPerfAPI-Common/IGPACommandList.h:13,
             from ../GPUPerfAPI-Common/GPUPerfAPI.cpp:25:
../GPUPerfAPI-Common/GPAHWInfo.h:12:24: fatal error: DeviceInfo.h: No such file or directory
compilation terminated.
../../Build/Linux/CommonTargets.mk:56: recipe for target '../../Output/obj/release/x64/GPUPerfAPI      /GPUPerfAPI.o' failed
make: *** [../../Output/obj/release/x64/GPUPerfAPI/GPUPerfAPI.o] Error 1

make: Leaving directory '/opt/GPA/Src/GPUPerfAPI'

Resetting sessions possible?

Is it possible to reset a session or is it by design that this is not possible? Looking through the code, the state of a session does not ever return to GPA_SESSION_STATE_NOT_STARTED once it leaves it.

This implies that a session object cannot be reused and requires create/delete for every sample. Just looking to verify the behavior.

SplitCounters() susceptible to hangs (inifinite loop)

The various SplitCounters() method implementation have a loop that is susceptible to hangs given bad GPU data. E.g., for the GPU I was adding, there was a goof in the auto generated files that left a counter group with a max-counters of zero. When I ran the color cube app, it hung in GpaSplitCountersConsolidated::SplitSingleCounter() because CanCounterBeAdded() always returns false in that case, and so it just keeps trying to add it to the next pass, which will go on for billions of iterations.

while (done_allocating_counter == false)
{
 ....
}

The hang was time consuming to debug. I think we can probably pick some reasonable maximum pass count which is impractical in the real world, and error out (with a log statement) if the looping exceeds that.

I've seen this problematic pattern in at least one other method: GpaContextCounterMediator::ScheduleCounters()
There may be more.

Questions about functionality

您好,我想知道您的项目中是否有关于AMD的GPU超频相关的操作
Hello, I want to know if there are any operations related to AMD GPU overclocking in your project

或者说?设置显存,核心的频率,风扇的转速,功耗,显存电压等相关操作
Or? Set the video memory, core frequency, fan speed, power consumption, video memory voltage and other related operations

抱歉我都英语并不是很好,我是使用翻译工具来进行翻译的
Sorry, my English is not very good. I use translation tools to translate

Vulkan support

Are there plans for Vulkan support with hardware-based counters or should we just use Radeon GPU-Profiler for traces and hw counters on Vulkan and/or DX12?

Fixing frequency for GPU

Hi,
I'm trying to use GPA library, but I believe that the values of GPU performance counters strongly depend on the current GPU frequency. Is there any software way to force GPU to work on certain frequency? Global WattMan (which comes with AMD drivers for graphics cards) provides the opportunity to fix the frequency on the selected level, but I'd like to do it automatically in my application. Also, is there a counter, which shows GPU frequency?

This is NOT awesome

I wish I had all the errors but this just a few. So far I have only had two successful builds. None of the install scripts work and this is primarily the results. So after hours of trying I've accomplished exactly nothing. With cmake that doesn't surprise since it's giant dumpster fire to begin with but this is insane. I don't write this so I count on those that do to get it right. This sucks. Oh year, this is the reult of having to replace the one that was downloaded to one I pulled from here today and this was my results.

CMake Error at CMakeLists.txt:9 (include):
include called with wrong number of arguments. include() only takes one
file.

CMake Error at CMakeLists.txt:37 (include):
include called with wrong number of arguments. include() only takes one
file.

CMake Error at CMakeLists.txt:9 (include):
include could not find requested file:

/common.cmake                                                                                                                                                                                                                        

CMake Error at CMakeLists.txt:37 (include):
include could not find requested file:

/Common.cmake                                                                                                                                                                                                                        

CMake Error at CMakeLists.txt:57 (REMOVE_TARGET_FROM_BUILD):
Unknown CMake command "REMOVE_TARGET_FROM_BUILD".

CMake Error at counter_generator_common.cmake:9 (include):
include could not find requested file:

/common.cmake                                                                                                                                                                                                                        

Call Stack (most recent call first):
CMakeLists.txt:6 (include)

CMake Error at counter_generator_common.cmake:10 (include):
include called with wrong number of arguments. include() only takes one
file.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)

CMake Error at counter_generator_common.cmake:11 (include):
include called with wrong number of arguments. include() only takes one
file.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)

CMake Error at counter_generator_common.cmake:12 (include):
include called with wrong number of arguments. include() only takes one
file.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)

CMake Error at counter_generator_common.cmake:13 (include):
include called with wrong number of arguments. include() only takes one
file.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)

Radeon Pro WX 5100 not supported?

Hello,
I got several error messages when using renderdoc + gpa.

OpenGL driver version is too old. Plesase update your driver.
Unable to obtain asic infomation.
Unable to get hardware information from the API.
Device not supported.
Open context for counters failed. GPA Error: Hardware Not Supported.

System Info:
Ubuntu-20.04.3
renderdoc-v1.17
amdgpu-install_21.40.2.40502-1_all.deb
mesa-21.3.0-devel
Radeon Pro WX 5100 device id is 0x67c7, revision id is 0x00.

Multiple Sesions at the same time

Hi, I want to profile two parallel pipelines and I have created two Sessions linked to each pipeline but the results I am getting are quite surprising. Is it possible that the sessions are interfering with each other?

thank you!

Runtime crash when HSA_TOOLS_LIB is set outside of GPA.

I'm using GPA in conjunction with some code that is also attempting to wrap the HSA runtime, and setting the HSA_TOOLS_LIB variable in the environment seems to disturb the initialization phase of GPA.

In SetHSAToolsLibEnvVar, the hsa-runtime-tools64 library will be overwritten with the current contents of HSA_TOOLS_LIB if the environment variable is set. This will lead to HSA skipping the OnLoad function for this library and most likely result in a segfault later when one of the tools lib functions is called. For me this was hsa_ext_tools_set_callback_functions a few levels down into GPA_OpenContext.

I'm fixing this on my end currently by including the hsa tools lib in my variable string, but this should probably be checked in the set tools lib function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.