mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 14:20:38 +08:00
test fixes
Summary: Some random seed changes. Skip multigpu tests when there's only one gpu. This is a better fix for what AI is doing in D80600882. Reviewed By: MichaelRamamonjisoa Differential Revision: D80625966 fbshipit-source-id: ac3952e7144125fd3a05ad6e4e6e5976ae10a8ef
This commit is contained in:
committed by
Facebook GitHub Bot
parent
50f8efa1cb
commit
dd068703d1
@@ -17,7 +17,7 @@ from pytorch3d.structures.pointclouds import (
|
||||
Pointclouds,
|
||||
)
|
||||
|
||||
from .common_testing import TestCaseMixin
|
||||
from .common_testing import needs_multigpu, TestCaseMixin
|
||||
|
||||
|
||||
class TestPointclouds(TestCaseMixin, unittest.TestCase):
|
||||
@@ -703,6 +703,7 @@ class TestPointclouds(TestCaseMixin, unittest.TestCase):
|
||||
self.assertEqual(cuda_device, cloud.device)
|
||||
self.assertIsNot(cloud, converted_cloud)
|
||||
|
||||
@needs_multigpu
|
||||
def test_to_list(self):
|
||||
cloud = self.init_cloud(5, 100, 10)
|
||||
device = torch.device("cuda:1")
|
||||
@@ -740,6 +741,7 @@ class TestPointclouds(TestCaseMixin, unittest.TestCase):
|
||||
self.assertTrue(cloud._P == new_cloud._P)
|
||||
self.assertTrue(cloud._C == new_cloud._C)
|
||||
|
||||
@needs_multigpu
|
||||
def test_to_tensor(self):
|
||||
cloud = self.init_cloud(5, 100, 10, lists_to_tensors=True)
|
||||
device = torch.device("cuda:1")
|
||||
|
||||
Reference in New Issue
Block a user