From 40230ea50a2ccd01fe0302fc2c74811b25fcbb28 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 27 Aug 2024 13:48:16 -0500 Subject: [PATCH] Add note about Kernel constructor for oddly-named kernels Closes gh-782 --- doc/runtime_program.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/runtime_program.rst b/doc/runtime_program.rst index 469a4a9c2..b6702542a 100644 --- a/doc/runtime_program.rst +++ b/doc/runtime_program.rst @@ -129,6 +129,14 @@ Program in the same name space and take precedence over :class:`Kernel` names. + .. note:: + + If you need to retrieve a kernel whose name includes non-identifier + characters, retrieving it as an attribute of + :class:`~pyopencl.Program` will + not work, for obvious reasons. In that case, you can use + the :class:`~pyopencl.Kernel` constructor directly. + .. method:: all_kernels() Returns a list of all :class:`Kernel` objects in the :class:`Program`.