mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 22:30:35 +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
@@ -29,7 +29,7 @@ from pytorch3d.renderer.opengl import MeshRasterizerOpenGL
|
||||
from pytorch3d.structures import Meshes, Pointclouds
|
||||
from pytorch3d.utils.ico_sphere import ico_sphere
|
||||
|
||||
from .common_testing import TestCaseMixin, usesOpengl
|
||||
from .common_testing import needs_multigpu, TestCaseMixin, usesOpengl
|
||||
|
||||
|
||||
# Set the number of GPUS you want to test with
|
||||
@@ -116,6 +116,7 @@ class TestRenderMeshesMultiGPU(TestCaseMixin, unittest.TestCase):
|
||||
output_images = renderer(mesh)
|
||||
self.assertEqual(output_images.device, device2)
|
||||
|
||||
@needs_multigpu
|
||||
def test_mesh_renderer_to(self):
|
||||
self._mesh_renderer_to(MeshRasterizer, SoftPhongShader)
|
||||
|
||||
@@ -173,6 +174,7 @@ class TestRenderMeshesMultiGPU(TestCaseMixin, unittest.TestCase):
|
||||
for _ in range(100):
|
||||
model(verts, texs)
|
||||
|
||||
@needs_multigpu
|
||||
def test_render_meshes(self):
|
||||
self._render_meshes(MeshRasterizer, HardGouraudShader)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user