MCPcopy Create free account
hub / github.com/pytorch/executorch / test_bitwise_equal

Method test_bitwise_equal

devtools/pte_tool/tests/test_diff_pte.py:94–102  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

92
93class DiffPteTest(unittest.TestCase):
94 def test_bitwise_equal(self) -> None:
95 weights = struct.pack("<4f", 1.0, 2.0, 3.0, 4.0)
96 prog = _make_program_with_constant_tensor(weights, sizes=[2, 2])
97 data = _serialize_program(prog)
98
99 result = diff_pte(data, data, "a.pte", "b.pte")
100 self.assertTrue(result.bitwise_equal)
101 self.assertIsNone(result.error)
102 self.assertEqual(result.plan_diffs, [])
103
104 def test_different_weights(self) -> None:
105 weights_a = struct.pack("<4f", 1.0, 2.0, 3.0, 4.0)

Callers

nothing calls this directly

Calls 4

diff_pteFunction · 0.90
_serialize_programFunction · 0.85
packMethod · 0.80

Tested by

no test coverage detected