Skip to content

Commit

Permalink
test_jit: Remove tests checking non-guaranteed properties from 'test_…
Browse files Browse the repository at this point in the history
…insert_observers'. (#21657)

Summary:
Pull Request resolved: pytorch/pytorch#21657
ghimport-source-id: e9c7e45c00db55bf3b7895d06d77f0d99bfc1afe

Differential Revision: D15769295

Pulled By: ZolotukhinM

fbshipit-source-id: cfb40bc5d7116b1d99f5e0f5c4f5577f5aa33804
  • Loading branch information
Mikhail Zolotukhin authored and facebook-github-bot committed Jun 11, 2019
1 parent ee33afe commit 1bd21d3
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions test/test_jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,21 +839,11 @@ def observe(x, name):
m(x1, y1)

# Check what we collected
self.assertTrue('x.1' in value_stats and 'y.1' in value_stats)
self.assertTrue('p.1' in value_stats and 'z.1' in value_stats)
self.assertEqual(len(value_stats), 5)
self.assertEqual(len(value_stats['p.1']), 1)
self.assertEqual(len(value_stats['z.1']), 1)
self.assertEqual(value_stats['p.1'][0], x1 + y1)
self.assertEqual(value_stats['z.1'][0], x1 - y1)

# Run one more time and check the updated statistics
m(x2, y2)
self.assertTrue('x.1' in value_stats and 'y.1' in value_stats)
self.assertEqual(len(value_stats['p.1']), 2)
self.assertEqual(len(value_stats['z.1']), 2)
self.assertEqual(value_stats['p.1'][1], x2 + y2)
self.assertEqual(value_stats['z.1'][1], x2 - y2)
self.assertEqual(len(value_stats), 5)

def test_insert_quantdequant_consecutive_qnodes_script(self):
input_data = torch.ones([1, 1, 5, 5])
Expand Down

0 comments on commit 1bd21d3

Please sign in to comment.