Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
zrr1999 committed Aug 1, 2024
1 parent 5748e25 commit 88561be
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions test/sot/test_sot_dynamic_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,23 @@ def test_dynamic_shape_cast(self):
self.assert_results(func, 1)
self.assert_results(func, 2)

# def test_dynamic_shape_in_list(self):
# with with_allow_dynamic_shape_guard(
# True
# ), test_instruction_translator_cache_context() as ctx:
# self.assert_results(
# dynamic_shape_in_list,
# paddle.randn([1, 4, 5]),
# [4, 5],
# )
# self.assertEqual(ctx.translate_count, 1)
# for i in range(2, 6):
# self.assert_results(
# dynamic_shape_in_list,
# paddle.randn([i, 4, 5]),
# [i * 4, 5],
# )
# self.assertEqual(ctx.translate_count, 2)
def test_dynamic_shape_in_list(self):
with with_allow_dynamic_shape_guard(
True
), test_instruction_translator_cache_context() as ctx:
self.assert_results(
dynamic_shape_in_list,
paddle.randn([1, 4, 5]),
[4, 5],
)
self.assertEqual(ctx.translate_count, 1)
for i in range(2, 6):
self.assert_results(
dynamic_shape_in_list,
paddle.randn([i, 4, 5]),
[i * 4, 5],
)
self.assertEqual(ctx.translate_count, 2)


if __name__ == '__main__':
Expand Down

0 comments on commit 88561be

Please sign in to comment.