Compare assembly ?

Compare assembly ?

Hi,I have a kernel that crash in some situations, what I got is a "dissassembly" from Visual Studio 2008. Something like this :77A204F8 jmp 779E874777A204FD and dword ptr [ebp-31Ch],077A20504 lea eax,[ebp-32Ch]77A2050A push eax 77A2050B mov dword ptr [ebp-32Ch],0C0000029h77A20515 mov dword ptr [ebp-328h],edi77A2051B mov dword ptr [ebp-324h],esi77A20521 call 779E8B6877A20526 jmp 779E8ACF77A2052B dec eax 77A2052C dec eax 77A2052D je 77A2055D77A2052F and dword ptr [ebp-31Ch],077A20536 lea eax,[ebp-32Ch]77A2053C push eax 77A2053D mov dword ptr [ebp-32Ch],0C0000026hThe problem is that I have no tool to find which intruction in my OpenCL kernel is related to this code ?Does the Intel Offline compiler can help ?Thanks

http://spectralbattle.wordpress.com/
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

There are several ways to go about it:
You can use the offline compiler and/or Intel VTune Amplifier to try and correspond OpenCL code to assembly. To ease the task, you can add write of "marker" constants such as 0x123456 to a dummy buffer, these cannot be optimized away and will help you segment your code if the offline compiler's annotations aren't enough.
Moreover, you could configure your debugger to catch access violation errors before try{} blocks get a chance to see them - for Microsoft Visual studio, this is under Debug->Exceptions->Win32 Exceptions. Then you can run in debug mode and get a notification as soon as the offending instruction occurs.

Doron Singer

Thanks a lot,

VTune amplifier sounds great but is too expensive for me :-(

About the dummy buffer, I can try... it is a strange and hard way to debug :-P

I also have set the 'access violation' exception in VS2008, it catch it and show me some dissassembly. But this dissassembly does not correspond to what I see in the Offline compiler !

http://spectralbattle.wordpress.com/

I have found something, it is not my problem but ... (At least I still have a crash)

I have a method like this :

float sample(Seed* seed) { ... }

and a call to this method :

__global clTask* task = ... ;
float b = sample( &task->seed );

The compiler say nothing, no error ! You see here that 'task' is a global pointer, so 'seed' is global too !

http://spectralbattle.wordpress.com/

Hi,

I have try to put a marker in the code, no success :-(

So, I have download the trial of VTune, it sounds to be a great product for optimization but it does not support OpenCL ! Also, I have not find any way to dissassemble some code to optimize too !

Are you sure that it is VTune ? If yes, how can I do please ?

Thanks

http://spectralbattle.wordpress.com/

Please read the user guide for information about integration with Intel VTune Amplifier and other tools.

Thanks Doron,It will be fine if the Offline compiler can be improved. Because we have no correspondance between the OpenCL code and the assembly code (LLVM code too).Also, a CPU debugging tools for OpenCL kernel will be welcome :-)ThanksKrys

http://spectralbattle.wordpress.com/

Leave a Comment

Please sign in to add a comment. Not a member? Join today