GPUOpen-Tools / radeon_gpu_analyzer

The Radeon GPU Analyzer (RGA) is an offline compiler and code analysis tool for Vulkan, DirectX, OpenGL, and OpenCL.
MIT License
405 stars 53 forks source link

RGA.exe offline mode is locking when called multiple times #103

Open godlikepanos opened 1 year ago

godlikepanos commented 1 year ago

This is a strange one. I have built an application that spawns multiple threads where each thread calls RGA.exe repeatedly to gather data. Suffice to say that RGA.exe is getting hammered with 32 threads. The problem is that no matter how many threads I throw to it, it never goes any faster and my CPU cores are sitting idle.

Another experiment I did was to run RGA.exe -h while my application was running (and hammering RGA.exe). Strangely enough RGA.exe -h also took a lot of time to finish.

It feels like only one RGA.exe instance can run at any time which is strange. Multiple RGA.exe can't work in parallel. Any idea what might be wrong?

Some notes:

TIMONz1535 commented 1 year ago

I had the same problems. RGA creates thousands of temporary log files and after that RGA started to "think" for a long time. For example, initialization takes 2 seconds because of 2k files. This increased the generation time of my shaders by 2 times. 40 seconds instead of 20 (then I also saw the 130k files of terminal logs, but they did not affect)

Cleaning temporary files helped at first. You can track them through Resource Monitoring.

rmdir /s /q "%LOCALAPPDATA%\D3DSCache"
rmdir /s /q "%TEMP%\GPUOpen"
del /q "%TEMP%\cxlTempFile_*.txt"
del /q "%TEMP%\osTempFile_*.txt"

BUT then it turned out that the generation was slowing down again. The processor is not fully loaded. It's like waiting for the system cache or something. Perhaps the antivirus or the ssd problems. After a few hours, everything becomes fine...

It is not repeated on another computer. Always fast work. Both launches work in the --offline mode for dx12

Windows 10 Pro 21H2 (19044.2486)
DirectX 12 (Radeon RX 580 Series or offline mode)
Radeon GPU Analyzer Version: 2.7.0.129