Can't debug AMP code

803 Views Asked by At

I can't debug my AMP code.

I have: Visual Studio 2015, Windows 10 Home 64bit, GeForce 660 Ti, DirectX 12

In my C++ project I've set the 'Debugger type' to 'GPU only (C++ AMP)' The 'Debugging accelerator type' is 'GPU - Software Emulator'

When I try to place a breakpoint in my lambda, I get the "The breakpoint will not be hit...' icon. Also, when I have code that gets the various accelerator infos, they all have 'is_debug=false'--including the 'direct3d/ref' accelerator and the GeForce 660Ti accelerator.

I've also tried specifically setting the default accelerator to direct3d_ref, but of course i think the problem is that it doesn't have debug, anyway.

What gives?

3

There are 3 best solutions below

2
Ken Seehart On

I've got the same situation. One hint I found: https://msdn.microsoft.com/en-us/library/hh265136.aspx

"Supported Platforms Debugging is supported on Windows 7, Windows 8, Windows Server 2008 R2, and Windows Server 2012. For debugging on the software emulator, Windows 8, or Windows Server 2012 is required. For debugging on the hardware, you must install the drivers for your graphics card. Not all hardware vendors implement all debugger features. See the vendor documentation for limitations."

From this, I gather that perhaps AMP debugging is not supported on Windows 10. Or perhaps the documentation is out of date.

It makes sense: AMP is made by Microsoft, but Windows 10 is made by Microsoft, so one would not expect them to be compatible. :)

Before I go back to Windows 8.1, I'd like to know for sure....

0
MoJoWi On

Is your lambda function a c++/amp restricted Function?

It should be so, otherwise the GPU debugging has no permission to enter a c++ restricted code section.

Maybe that is why you get the:

"The breakpoint will not be hit..."

for more information read:

https://msdn.microsoft.com/en-us/library/hh873133.aspx

Of course a code example would be nice. to try it out on a different machine.

0
Quxflux On

Another hint for this: When trying to debug I saw a debug output message saying "Please use the /DEBUG:FULL linker switch to hit breakpoints in C++ AMP code."

After changing the linker settings debugging worked for me.