MCPcopy Create free account
hub / github.com/pytorch/pytorch / test_decompose

Method test_decompose

test/test_per_overload_api.py:63–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 self.assertRaises(RuntimeError, lambda: add_tensoroverload(a, a, out=b))
62
63 def test_decompose(self):
64 x = torch.randn(2, 3)
65 y = torch.randn(5, 3)
66 self.assertEqual(
67 torch.ops.aten.linear.default.decompose(x, y),
68 torch.ops.aten.linear.default(x, y)
69 )
70
71if __name__ == '__main__':
72 run_tests()

Callers

nothing calls this directly

Calls 4

decomposeMethod · 0.80
defaultMethod · 0.80
randnMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected