mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-14 19:36:23 +08:00
Cuda updates
Summary: Updates to: - enable cuda kernel launches on any GPU (not just the default) - cuda and contiguous checks for all kernels - checks to ensure all tensors are on the same device - error reporting in the cuda kernels - cuda tests now run on a random device not just the default Reviewed By: jcjohnson, gkioxari Differential Revision: D21215280 fbshipit-source-id: 1bedc9fe6c35e9e920bdc4d78ed12865b1005519
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c9267ab7af
commit
c3d636dc8c
@@ -33,7 +33,9 @@ class TestCubify(unittest.TestCase):
|
||||
|
||||
# 1st-check
|
||||
verts, faces = meshes.get_mesh_verts_faces(0)
|
||||
self.assertTrue(torch.allclose(faces.max(), torch.tensor([verts.size(0) - 1])))
|
||||
self.assertTrue(
|
||||
torch.allclose(faces.max().cpu(), torch.tensor([verts.size(0) - 1]))
|
||||
)
|
||||
self.assertTrue(
|
||||
torch.allclose(
|
||||
verts,
|
||||
@@ -78,7 +80,9 @@ class TestCubify(unittest.TestCase):
|
||||
)
|
||||
# 2nd-check
|
||||
verts, faces = meshes.get_mesh_verts_faces(1)
|
||||
self.assertTrue(torch.allclose(faces.max(), torch.tensor([verts.size(0) - 1])))
|
||||
self.assertTrue(
|
||||
torch.allclose(faces.max().cpu(), torch.tensor([verts.size(0) - 1]))
|
||||
)
|
||||
self.assertTrue(
|
||||
torch.allclose(
|
||||
verts,
|
||||
|
||||
Reference in New Issue
Block a user