C++ AMP: get_accelerators() performance
-
martes, 28 de febrero de 2012 13:03
While debugging a C++ AMP program (built in Release mode) in Visual Studio Developer Preview, I noticed that the run-time for concurrency::get_accelerators() takes more than ~2.4 seconds within the debugger, but ~80 ms outside the debugger. I have no breakpoints defined. While I see a slight overall inflation of timing for all code when run in the debugger, get_accelerators() is the one function in C++ AMP that seems to increase two orders of magnitude within a debug session. Is this normal, will Beta improve this, and why would it be so much slower while debugging?
Ken
Todas las respuestas
-
miércoles, 29 de febrero de 2012 9:24Propietario
Hi Ken
I am not seeing anywhere near such a large delay (or difference between debug and release) on my machine. Can you please try with the VS 11 Beta (out in a few hours) and let us know if you are still observing this?
BTW, get_accelerators() has been replaced with accelerator::get_all()
http://blogs.msdn.com/b/nativeconcurrency/archive/2012/02/02/default-accelerator-in-c-amp.aspx
Cheers
Daniel
http://www.danielmoth.com/Blog/
-
miércoles, 29 de febrero de 2012 23:51
The get_all() r.t. still seems to happen with VS 11 Beta. (But many of my tests run faster--nice!). On another machine (Llano, Windows 8 DP, VS 11 DP) I don't see the problem. So, it could be something with the hardware (it has two graphics cards), and/or a Window 7 thing. I will try to look into this when I have time to break open my machine and reorganize the hardware in a few days. Thanks.
Ken
-
sábado, 03 de marzo de 2012 0:12
Hi Ken,
I did not observe the delay, you mentioned, on my Windows 7 SP1 machine. Can you let me know the details of the hardware, you are using, and also their driver details.
Pavan
-
sábado, 03 de marzo de 2012 15:07
Hi Pavan,
The list of hardware and drivers I used, and the program I wrote for the timing data is here.
Ken
-
lunes, 05 de marzo de 2012 16:47
I removed one of my video cards, an ATI Radeon HD 6450. (Remaining hardware: Asus P5N-D motherboard, Intel Q6600 @ 2.51 GHz (overclocked), 4 GB DDR2-1066 @ 838 MHz, Windows 7 64-bit OS, NVIDIA GeForce GTX 470.) The run-time of the get_all() function (for the Release-built executable, ran within the debugger) decreases over 2 seconds, from 3.8 s to 1.2 s.
Stopping before the get_all() function, then proceeding through it, I noticed the following in the output window.
'ConsoleApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Symbols loaded.
'ConsoleApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvwgf2um.dll'. Cannot find or open the PDB file.
'ConsoleApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d10warp.dll'. Symbols loaded.
First-chance exception at 0x760CB9BC in ConsoleApplication.exe: Microsoft C++ exception: std::exception at memory location 0x003C32F0.
'ConsoleApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11ref.dll'. Cannot find or open the PDB file.Ken
-
lunes, 05 de marzo de 2012 17:22
The call stack for the exception is:
KernelBase.dll!_RaiseException@16() Unknown
vcamp110.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 141 C++
> vcamp110.dll!Concurrency::details::_D3D_accelerator_impl::_D3D_accelerator_impl(IDXGIAdapter *) Line 105 C++
vcamp110.dll!Concurrency::details::_D3D_accelerator_impl::_Create_D3D_accelerator_impl(Concurrency::details::_D3D_device_type _Device_type) Line 264 C++
vcamp110.dll!Concurrency::details::_DPC_runtime_factory::_DPC_runtime_factory() Line 421 C++
vcamp110.dll!Concurrency::details::_DPC_runtime_factory::_Init_global_runtime_factory(_RTL_RUN_ONCE * InitOnce, void * inParam, void * * contextPtr) Line 655 C++
ntdll.dll!_RtlRunOnceExecuteOnce@16() Unknown
kernel32.dll!_InitOnceExecuteOnce@16() Unknown
vcamp110.dll!Concurrency::details::_DPC_runtime_factory::_Get_factory() Line 667 C++
vcamp110.dll!Concurrency::details::_Get_num_devices() Line 63 C++
Win32Project3.dll!Concurrency::accelerator::get_all() Line 799 C++
Win32Project3.dll!do_copy(options * opt, Timing_Information * global_info) Line 257 C++
Win32Project3.dll!doit(options * opt, Timing_Information * global_info) Line 297 C++
ConsoleApplication.exe!do_perf(options * opt, char * dll_name) Line 36 C++
ConsoleApplication.exe!main(int argc, char * * argv) Line 159 C++
ConsoleApplication.exe!__tmainCRTStartup() Line 537 C
kernel32.dll!@BaseThreadInitThunk@12() Unknown
ntdll.dll!___RtlUserThreadStart@8() Unknown
ntdll.dll!__RtlUserThreadStart@8() Unknown
-
sábado, 10 de marzo de 2012 1:25Propietario
Hi Ken,<o:p></o:p>
This is a known internal exception in the C++ AMP runtime VS 11 Beta bits. You can safely ignore this exception - the C++ AMP runtime will handle it. We have gotten rid of this exception post Beta.<o:p></o:p>
Also, now seeing the VS debug output shared by you, I realized why “get_all” is taking so long from inside the debugger. You appear to have the MS symbol servers selected in your project settings and the loading of symbols for DLLs that get dynamically loaded as part of “get_all” (d3d10warp.dll, d3d11ref.dll etc.) are the cause of the slowdown when running inside the debugger.<o:p></o:p>
Amit
Amit K Agarwal
- Propuesto como respuesta DanielMothMicrosoft Employee, Owner domingo, 11 de marzo de 2012 3:36
- Marcado como respuesta Ken Domino lunes, 12 de marzo de 2012 19:41

