From 7819362faf778363e5b59c461b4a906adaf3bdfd Mon Sep 17 00:00:00 2001
From: Nicholas Christensen <njchris2@illinois.edu>
Date: Sat, 26 Sep 2020 17:49:44 -0500
Subject: [PATCH] Use all operators in cache key

---
 grudge/execution.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/grudge/execution.py b/grudge/execution.py
index 989d1ccc..f8420e78 100644
--- a/grudge/execution.py
+++ b/grudge/execution.py
@@ -529,7 +529,7 @@ class ExecutionMapper(mappers.Evaluator,
                 continue
 
             # Cache operator
-            cache_key = "diff_batch", in_grp, out_grp, repr_op, field.dtype
+            cache_key = "diff_batch", in_grp, out_grp, tuple(insn.operators), field.dtype
             try:
                 matrices_ary_dev = self.bound_op.operator_data_cache[cache_key]
             except KeyError:
@@ -537,10 +537,10 @@ class ExecutionMapper(mappers.Evaluator,
                 matrices_ary = np.empty((
                     noperators, out_grp.nunit_dofs, in_grp.nunit_dofs))
                 for i, op in enumerate(insn.operators):
-                    matrices_ary[i,:,:] = matrices[op.rst_axis][:,:]
+                    matrices_ary[i] = matrices[op.rst_axis]
                 matrices_ary_dev = self.array_context.from_numpy(matrices_ary)
                 self.bound_op.operator_data_cache[cache_key] = matrices_ary_dev
-
+            
             self.array_context.call_loopy(
                     prg(noperators),
                     diff_mat=matrices_ary_dev,
-- 
GitLab