[Mesa-dev] pfn_notify in clCreateContext()
imirkin at alum.mit.edu
Fri Feb 24 16:30:47 UTC 2017
I'd like to point out that when I hooked up this logic in clover
(after my triumphant addition of KHR_debug in gallium), I had no idea
how OpenCL stuff worked. I still don't. If you think passing this type
of information is inappropriate, or that some of the message types
should be filtered out, you should go ahead and do that.
The API was mostly modeled after the KHR_debug capabilities, so if it
doesn't fit well with what OpenCL wants, you can also just revert my
commit that hooked it up. It was purely speculative, without an actual
use-case in mind.
On Fri, Feb 24, 2017 at 11:00 AM, Vedran Miletić <vedran at miletic.net> wrote:
> I noticed that Clover outputs si_shader_dump_stats() via pfn_notify
> callback registered clCreateContext() (it's not done directly, but
> that's the result). According to OpenCL standard documentation ,
> pfn_notify should be used only to report errors.
> One of the programs that gets confused by our behavior is OpenMM,
> outputing lines such as:
> OpenCL internal error: Shader Stats: SGPRS: 16 VGPRS: 11 Code Size:
> 10804 LDS: 0 Scratch: 0 Max Waves: 10 Spilled SGPRs: 0 Spilled VGPRs: 0
> PrivMem VGPRs: 0
> What should we do?
> 1) Leave as is in hope that no application is broken by it beyond
> printing non-errors.
> 2) Do not print debug_message() (including si_shader_dump_stats()) via
> 3) Introduce separate error_message() for pfn_notify instead of
> Vedran Miletić
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
More information about the mesa-dev