diff --git a/pytato/distributed/partition.py b/pytato/distributed/partition.py index c929f750c..4a0eb5897 100644 --- a/pytato/distributed/partition.py +++ b/pytato/distributed/partition.py @@ -992,18 +992,18 @@ def get_materialized_predecessors(ary: Array) -> _OrderedSet[Array]: # }}} - # Don't be tempted to put outputs in _array_names; the mapping from output array + # Don't be tempted to put outputs in array_names; the mapping from output array # to name may not be unique - _array_name_gen = UniqueNameGenerator(forced_prefix="_pt_dist_") - _array_names: dict[Array, str] = {} + array_name_gen = UniqueNameGenerator(forced_prefix="_pt_dist_") + array_names: dict[Array, str] = {} def gen_array_name(ary: Array) -> str: - name = _array_names.get(ary) + name = array_names.get(ary) if name is not None: return name else: - name = _array_name_gen() - _array_names[ary] = name + name = array_name_gen() + array_names[ary] = name return name recvd_ary_to_name: dict[Array, str] = { diff --git a/test/test_codegen.py b/test/test_codegen.py index 74ab8ebfb..5b62ce468 100755 --- a/test/test_codegen.py +++ b/test/test_codegen.py @@ -1571,11 +1571,11 @@ def test_regression_reduction_in_conditional(ctx_factory): cq = cl.CommandQueue(ctx) def kernel(usr_np, _pt_data_9): - _pt_tmp_53 = _pt_data_9 @ _pt_data_9 - _pt_tmp_42 = usr_np.maximum(_pt_tmp_53, _pt_tmp_53) - _pt_tmp_27 = usr_np.sum(_pt_tmp_42) - _pt_tmp_0 = usr_np.maximum(_pt_tmp_27, _pt_tmp_53) - return _pt_tmp_0 + pt_tmp_53 = _pt_data_9 @ _pt_data_9 + pt_tmp_42 = usr_np.maximum(pt_tmp_53, pt_tmp_53) + pt_tmp_27 = usr_np.sum(pt_tmp_42) + pt_tmp_0 = usr_np.maximum(pt_tmp_27, pt_tmp_53) + return pt_tmp_0 def get_np_input_args(): return {