From 91a559f20e9c69ddbff80fd73db420774f4eb815 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Fri, 2 Apr 2021 16:48:18 -0500 Subject: [PATCH] Avoid possible hash-key confusion in first_arg_dependent_memoize between with/without-kwargs calls --- pyopencl/tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyopencl/tools.py b/pyopencl/tools.py index 262da225..67302d8a 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -86,7 +86,8 @@ def first_arg_dependent_memoize(func): if kwargs: cache_key = (args, frozenset(kwargs.items())) else: - cache_key = args + cache_key = (args,) + try: ctx_dict = func._pyopencl_first_arg_dep_memoize_dic except AttributeError: -- GitLab