Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.8.0.27 Failed to finish executing profile with code: 0 #26

Closed
kaiserschmarrn0 opened this issue Dec 20, 2022 · 9 comments
Closed

2.8.0.27 Failed to finish executing profile with code: 0 #26

kaiserschmarrn0 opened this issue Dec 20, 2022 · 9 comments

Comments

@kaiserschmarrn0
Copy link

kaiserschmarrn0 commented Dec 20, 2022

RDP bug report

cant capture profiles

==========================================
Steps to Reproduce

  1. run rdp
  2. run target program
  3. capture

==========================================
Host System Information

RDP Version: Radeon Developer Panel v2.8.0.27
RDP build Date: 12/12/2022

Operating System: Windows 11 Version 21H2
Qt Version: 5.15.2

Tool Version: 2.0.0
Router Version 0.13.0

==========================================
Connected System Information

Driver Version: 22.20.29.10-221130a-386458C-AMD-Software-Adrenalin-Edition
GPUOpen Interface Major Version: 42

Operating System Name: Windows 11 Home
Operating System Description: 22000.1.amd64fre.co_release.210604-1628

GPUs:


Name: Radeon RX 5500 XT

ASIC info


Device Id: 29504
Revision: 197
Family: 143
gfx_engine: 13

RDP log:

Log file created successfully: [C:/Users/j/AppData/Roaming/RadeonDeveloperPanel/log.txt]
Initializing RDP v2.8.0.27
	System Info
		CPU Architecture    :                                   x86_64
		Kernel Type         :                                    winnt
		Kernel Version      :                               10.0.22000
		OS Name             :                  Windows 11 Version 21H2
		Host Name           :                          DESKTOP-BNGON08
	Qt Library Versions
		Compile-Time        :                                   5.15.2
		Run-Time            :                                   5.15.2
	DDTool Library Versions
		Compile-Time        :                                    2.0.0
		Link-Time           :                                    2.0.0
	DDRouter Library Versions
		Compile-Time        :                                   0.13.0
		Link-Time           :                                   0.13.0
Attempting to load config from default location: C:\Users\j\Downloads\RadeonDeveloperToolSuite-2022-12-12-1037\RadeonDeveloperToolSuite-2022-12-12-1037\.devdriver\ddTool\
No config found, skipping creation and loading default config json
Loaded 1 file(s):
+ config.json - 40 bytes - C:\Users\j\Downloads\RadeonDeveloperToolSuite-2022-12-12-1037\RadeonDeveloperToolSuite-2022-12-12-1037\.devdriver\ddTool\config.json
config.json version: 1
Found 0 module entries
Successfully parsed config json string
Successfully created tool context
Loading Modules
	Querying for Existing Modules
	Dynamic Modules: [0]
	Built-in Modules: [4]
		[0]: MemoryTrace
			ddModuleLoader's Module API Version 1.18.0 | MemoryTrace's Module API Version 1.18.0
			MemoryTrace's Module Version 0.8.0
			Required MemoryTrace Module Extension API Version 0.13.0 | MemoryTrace Module Extension API Version 0.13.0 | Extension Id 0x7972756372656d
			MercuryModuleExt GUI extension found! ((null):0, (null))
		[1]: Profiling
			ddModuleLoader's Module API Version 1.18.0 | Profiling's Module API Version 1.18.0
			Profiling's Module Version 0.4.0
			Required Profiling Module Extension API Version 0.13.0 | Profiling Module Extension API Version 0.13.0 | Extension Id 0x7972756372656d
			MercuryModuleExt GUI extension found! ((null):0, (null))
		[2]: DeviceClocks
			ddModuleLoader's Module API Version 1.18.0 | DeviceClocks's Module API Version 1.18.0
			DeviceClocks's Module Version 0.2.0
			Required DeviceClocks Module Extension API Version 0.13.0 | DeviceClocks Module Extension API Version 0.13.0 | Extension Id 0x7972756372656d
			MercuryModuleExt GUI extension found! ((null):0, (null))
		[3]: UberTrace
			ddModuleLoader's Module API Version 1.18.0 | UberTrace's Module API Version 1.18.0
			UberTrace's Module Version 0.2.0
			Required UberTrace Module Extension API Version 0.13.0 | UberTrace Module Extension API Version 0.13.0 | Extension Id 0x7972756372656d
			MercuryModuleExt GUI extension found! ((null):0, (null))
Loading default workflows
Loading settings group: [Workflows]
Loading settings group: [Managed Applications]
Saving settings group: [Managed Applications]
Loading Settings File: [C:/Users/j/AppData/Roaming/RadeonDeveloperPanel/settings.ini]
	Loading settings group: [ConnectionWidget]
Starting new Router [Local]
	Successfully initialized a developer mode message bus with client: 1348
	ddModuleLoader's Module API Version 1.18.0 | DevToolsRouter's Module API Version 1.18.0
	DevToolsRouter's Module Version 0.1.0
	Connecting module DevToolsRouter
	Successfully created a connection context
	ddModuleLoader's Module API Version 1.18.0 | SystemInfoRouter's Module API Version 1.18.0
	SystemInfoRouter's Module Version 0.1.0
	Connecting module SystemInfoRouter
	Successfully created a connection context
Attempting to connect to ddTool [Local]
Connecting to Local
	ddNet local connection succeeded
ddEventCallback: EVENT_BUS_CONNECT
Loading settings group: [Blocklist]
Received initial halted message from client with id 7418! (drawback.exe)
Successfully connected to client with id 7418 via driver control
ddEventCallback: EVENT_CLIENT_CONNECT
The file name for the process was C:\Users\j\plap\build\drawback.exe
Successfully bound profile instance with client [drawback.exe]
Initializing client with id 7418
Advanced driver state (Platform Init -> Device Init) on client with id 7418
Advanced driver state (Device Init -> Post Device Init) on client with id 7418
ddEventCallback: EVENT_CLIENT_INITIALIZE
Successfully resumed driver on client with id 7418
[RGP] End capture profile
TRANSFER END  0 ((null):0, (null))
[RGP] Failed to capture profile.
[RGP] Failed to finish executing profile with code: 0
Disconnecting DDTool
Successfully disconnected from network
ddEventCallback: EVENT_CLIENT_INSTANCE_RELEASE
Saving settings group: [Managed Applications]
ddEventCallback: EVENT_BUS_DISCONNECT
	Reason: [DD_RESULT_SUCCESS]
	Shutting down local router
	Unloading module DevToolsRouter
	Unloading module SystemInfoRouter
	Shut down the developer mode message bus.
Saving Settings File: [C:/Users/j/AppData/Roaming/RadeonDeveloperPanel/settings.ini]
	Saving settings group: [ConnectionWidget]
Disconnecting from DDTool
@kaiserschmarrn0
Copy link
Author

🥹

@MathiasMagnus
Copy link

Seems pretty much in line with #25. The silence from the devs is not a good sign either (although it's mostly natural on these AMD public-issue-tracker-and-release-page type GitHub repos). I've not managed to capture a single profile with this tool in the past 8 months or so, or ever to be exact. (The screenshots are nice though.)

@mguerret-amd
Copy link
Collaborator

@MathiasMagnus We do read these. The issue here is narrowing this down as we have not been able to reproduce this internally at all. Is there a chance you could share an application that reproduces this issue?

@kaiserschmarrn0
Copy link
Author

mre: https://files.catbox.moe/4jzdyq.zip

you need to edit the build script with your path to the vulkan loader and glslangvalidator. you may also need to replace clang with msvc. i couldn't make an msvc version because cl is not in my path. presumably microsoft does not want me using msvc.

mre.c is ~400 lines and causes the issue. it writes to the swapchain in a compute shader and then presents it. vkcube works. a similar (more complex) program worked windows 10 with an older version of developer tools worked.

the log looks the same as OP:
Received initial halted message from client with id 6201! (mre.exe) Successfully connected to client with id 6201 via driver control ddEventCallback: EVENT_CLIENT_CONNECT Saving settings group: [Managed Applications] Saving settings group: [Managed Applications] The file name for the process was C:\Users\j\AMD MRE\build\mre.exe Successfully bound profile instance with client [mre.exe] Initializing client with id 6201 Advanced driver state (Platform Init -> Device Init) on client with id 6201 Advanced driver state (Device Init -> Post Device Init) on client with id 6201 ddEventCallback: EVENT_CLIENT_INITIALIZE Successfully resumed driver on client with id 6201 [RGP] End capture profile TRANSFER END 0 ((null):0, (null)) [RGP] Failed to capture profile. [RGP] Failed to finish executing profile with code: 0 [RGP] End capture profile TRANSFER END 0 ((null):0, (null)) [RGP] Failed to capture profile. [RGP] Failed to finish executing profile with code: 0 ddEventCallback: EVENT_CLIENT_INSTANCE_RELEASE Saving settings group: [Managed Applications] Client with id 6201 disconnected

since this may be a config issue, i've tried the past few versions of RDP (some of which segfault), i've updated to the latest vulkan sdk, and updated my gpu drivers. any suggestions short of reinstalling windows 10?

i tried using nsight on my old 1070 computer, but it crashes. lol. also, it doesn't support profiling vulkan on pascal. perhaps i should be using vtune on my skylake mobile igpu.

@MathiasMagnus
Copy link

@kaiserschmarrn0

  1. cl.exe isn't on the PATH, because MSVC isn't like GCC/Clang. There is a separate executable for each target, so instead of adding -m32 or -m64 or -mcpu=xyz you put the cl.exe of your choice onto the PATH. This is a developer command-prompt. In a regular cmd.exe prompt it's done by invoking vcvarsall.bat (for eg. see here). In PowerShell because native commands are executed in child shells, changes made by the batch script are lost (and there's no dot sourcing batch scripts), in PS it's done by a module shipped with VS. (again, for CI inspiration see here)
  2. In a sister thread of this I managed to capture a profile from a simple compute application, but I have to run the kernels far more than the original application would warrant it. Capturing a single kernel launch requires to set the RDP to capture just the first kernel, but I still need to launch the kernel ~50 times for the capture to happen. (For good measure, I sleep after init and before app termination for 5 seconds, just to make sure.)

@kaiserschmarrn0
Copy link
Author

yeah, i know how msvc works, i just do not want to use it.

as for the 2nd point, we may have a separate issue (i am profiling vulkan). the mre i sent runs a shader and presents the swapchain repeatedly until the window is closed. there are plenty of invocations to sample.

@MattGuerrette
Copy link

MattGuerrette commented Feb 7, 2023

@kaiserschmarrn0 from the looks of your sample code you appear to be using Vulkan Compute correct? The Radeon Developer Panel currently only supports Vulkan graphics workloads and not compute-only workloads. Once Vulkan compute is supported it would certainly be listed here:

https://radeon-developer-panel.readthedocs.io/en/latest/#compute-apis-rdna-and-gcn-hardware-and-operating-systems

@kaiserschmarrn0
Copy link
Author

I see. In that case, I'll close this issue.

What might have caused it to work before? I'd rather not upgrade my pc.

@kaiserschmarrn0
Copy link
Author

I've just changed it to present and dispatch on the same graphics queue, and it works. My old code allowed for using a separate compute queue based on driver behavior. What a silly thing preventing me from profiling for so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants