[Mesa-dev] pfn_notify in clCreateContext()

Ilia Mirkin 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.

src/gallium/state_trackers/clover/core/queue.cpp::debug_notify_callback

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.

Cheers,

  -ilia


On Fri, Feb 24, 2017 at 11:00 AM, Vedran Miletić <vedran at miletic.net> wrote:
> Hello,
>
> 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 [1],
> 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
> pfn_notify.
> 3) Introduce separate error_message() for pfn_notify instead of
> debug_message().
>
> Regards,
> Vedran
>
> [1]
> https://www.khronos.org/registry/OpenCL/sdk/1.1/docs/man/xhtml/clCreateContext.html
>
> --
> Vedran Miletić
> vedran.miletic.net
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list