We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b804a2 commit a658b28Copy full SHA for a658b28
tests/py/test_multi_gpu.py
@@ -5,7 +5,9 @@
5
6
from model_test_case import ModelTestCase
7
8
+
9
class TestMultiGpuSwitching(ModelTestCase):
10
11
def setUp(self):
12
if torch.cuda.device_count() < 2:
13
self.fail("Test is not relevant for this platform since number of available CUDA devices is less than 2")
@@ -55,12 +57,14 @@ def test_compile_script(self):
55
57
trtorch.set_device(0)
56
58
self.assertTrue(same < 2e-3)
59
60
61
def test_suite():
62
suite = unittest.TestSuite()
63
suite.addTest(TestMultiGpuSwitching.parametrize(TestMultiGpuSwitching, model=models.resnet18(pretrained=True)))
64
65
return suite
66
67
68
suite = test_suite()
69
70
runner = unittest.TextTestRunner()
0 commit comments