From: Jacob Lifshay Date: Fri, 28 Apr 2023 08:48:03 +0000 (-0700) Subject: change order to tuple in remap preduce tests/demos to match rest of simulator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f451e7846d4561a36a67d38814d814ea59f3802;p=openpower-isa.git change order to tuple in remap preduce tests/demos to match rest of simulator --- diff --git a/src/openpower/decoder/isa/remap_preduce_yield.py b/src/openpower/decoder/isa/remap_preduce_yield.py index 9e9fa2a6..9111435e 100644 --- a/src/openpower/decoder/isa/remap_preduce_yield.py +++ b/src/openpower/decoder/isa/remap_preduce_yield.py @@ -44,7 +44,7 @@ def iterate_indices2(SVSHAPE, pred=None): # invert the indices if needed if SVSHAPE.invxyz[0]: ix.reverse() - if SVSHAPE.order != [0, 1, 2] or any(SVSHAPE.invxyz[1:]): + if SVSHAPE.order != (0, 1, 2) or any(SVSHAPE.invxyz[1:]): raise ValueError("undefined") if SVSHAPE.skip & 0b10: # this is a scan/prefix-sum rather than a reduction. @@ -113,7 +113,7 @@ def demo_prefix_sum(): pass SVSHAPE0 = SVSHAPE() SVSHAPE0.lims = [xdim, 0, 0] - SVSHAPE0.order = [0, 1, 2] + SVSHAPE0.order = 0, 1, 2 SVSHAPE0.mode = 0b10 SVSHAPE0.skip = 0b10 # prefix-sum lhs SVSHAPE0.offset = 0 # experiment with different offset, here @@ -121,7 +121,7 @@ def demo_prefix_sum(): SVSHAPE1 = SVSHAPE() SVSHAPE1.lims = [xdim, 0, 0] - SVSHAPE1.order = [0, 1, 2] + SVSHAPE1.order = 0, 1, 2 SVSHAPE1.mode = 0b10 SVSHAPE1.skip = 0b11 # prefix-sum rhs SVSHAPE1.offset = 0 # experiment with different offset, here diff --git a/src/openpower/decoder/isa/test_remap_preduce_yield.py b/src/openpower/decoder/isa/test_remap_preduce_yield.py index 04b4d93f..fa325bb3 100644 --- a/src/openpower/decoder/isa/test_remap_preduce_yield.py +++ b/src/openpower/decoder/isa/test_remap_preduce_yield.py @@ -33,7 +33,7 @@ class TestRemapPrefixSum(unittest.TestCase): def iterate_indices2_helper(self, reverse, item_count, offset): lhs_svshape = MockSVShape( lims=[item_count, 0, 0], - order=[0, 1, 2], + order=(0, 1, 2), mode=0b10, skip=0b10, # prefix-sum lhs offset=offset, @@ -41,7 +41,7 @@ class TestRemapPrefixSum(unittest.TestCase): ) rhs_svshape = MockSVShape( lims=[item_count, 0, 0], - order=[0, 1, 2], + order=(0, 1, 2), mode=0b10, skip=0b11, # prefix-sum rhs offset=offset,