diff --git a/pyopencl/invoker.py b/pyopencl/invoker.py index 6673646e..a90a121e 100644 --- a/pyopencl/invoker.py +++ b/pyopencl/invoker.py @@ -259,7 +259,8 @@ def gen_arg_setting(in_enqueue): # {{{ generate _enqueue - enqueue_name = "enqueue_knl_%s" % function_name + from pytools import to_identifier + enqueue_name = f"enqueue_knl_{to_identifier(function_name)}" gen("def %s(%s):" % (enqueue_name, ", ".join([