Feedback/questions from today's call
Witold Bołt
witold.bolt at hope.art.pl
Wed Nov 14 14:05:48 PST 2012
Hi.
I have partial answers to your questions…
#2: AFAIK this is difficult and vendor dependent. AMD (http://developer.amd.com/tools/heterogeneous-computing/amd-gdebugger/), nVidia (http://www.nvidia.com/object/nsight.html) and Intel (http://software.intel.com/en-us/articles/programming-with-the-intel-sdk-for-opencl-applications-development-tools) have some tools that help to analyze/debug kernels… but its nothing "standardized", open and accessible to 3rd parties. Also… from some small experiences with Aparapi I found that using such tools in some cases is really hard and in others its not possible at all. Maybe it all changed during last couple of months, but when I tried it…. it was really disappointing.
The only "standard" thing that is present is a basic profiling API defined within OpenCL standard (http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clGetEventProfilingInfo.html), that allows execution time queries for different OpenCL operations.
#3: Obviously there are fatal errors possible - like dividing by zero, accessing buffers outside of defined scope and so on. This is quite interesting topic. For now Aparapi doesn't help much in this area - see this:
"Runtime Exceptions
• When run on the GPU, array accesses will not generate an ArrayIndexOutOfBoundsException. Instead the behavior will be unspecified.
• When run on the GPU, ArithmeticExceptions will not be generated, for example with integer division by zero. Instead the behavior will be unspecified."
(http://code.google.com/p/aparapi/wiki/JavaKernelGuidelines)
So it means that you can get "some" results from faulty code execution and you might not get informed about those faults.
Interestingly OpenCL specification doesn't provide any means to get such detailed info on kernel execution. For example - errors possible with clEnqueueNDRangeKernel (the function that enqueues your kernel for execution) are limited only to some core stuff like "out of memory", "not defined kernel" and so on (see here: http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clEnqueueNDRangeKernel.html).
It seems that this will be the hard part.
Br,
Witold Bołt | witold.bolt at hope.art.pl | +48 600 374 215
Wiadomość napisana przez Gerard Ziemski <gerard.ziemski at oracle.com> w dniu 14 lis 2012, o godz. 20:45:
> hi all,
>
> Forgive me if I'm addressing the elephant in the room, but wouldn't it have been useful to invite NVIDIA to participate in these calls? It seems to me that today's discussion covered a lot of general topics that would apply to the other GPU team and even the platform specific questions to AMD folks would benefit the project if answered from the NVIDIA team at the same time.
>
> A couple of general questions:
>
> #1 What kind of performance counters does the GPU provide that could possibly help the JVM to figure out the most optimal implementation when compiling the Java code for it? Is it possible to have some sort of feedback loop from GPU telling JVM how well its code is executing?
>
> #2 Is it possible to debug/analyze code executing on GPU? Can it be exposed in Java debugger in any way?
>
> #3 Can a GPU program crash? What are the examples that would cause it crash and how is it handled?
>
> #4 For a client system, which I will define as a system where a process is just one of many other processes running concurrently that may want to use the same resources (ie. for GPU other apps such as a window manager, browser), or even the same process that uses the GPU for computation and also for rendering visuals (ie. JavaFX which uses GPU to render its UI), is it a concern to possibly starve other parts of the system by JVM if it starts using the GPU aggressively?
>
>
> cheers
>
More information about the sumatra-dev
mailing list