MCPcopy Create free account
hub / github.com/Kaggle/docker-python / test_linalg

Method test_linalg

tests/test_pytorch.py:20–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 @gpu_test
19 def test_linalg(self):
20 A = torch.randn(3, 3).t().to('cuda')
21 B = torch.randn(3).t().to('cuda')
22
23 result = torch.linalg.solve(A, B)
24 self.assertEqual(3, result.shape[0])
25
26 @gpu_test
27 def test_gpu_computation(self):
28 cuda = torch.device('cuda')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected