Skip to content

Commit

Permalink
fix point_to_mesh distance issue (#592)
Browse files Browse the repository at this point in the history
Signed-off-by: Clement Fuji Tsang <cfujitsang@nvidia.com>
  • Loading branch information
Caenorst committed Jul 16, 2022
1 parent 615fffc commit 207e187
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kaolin/metrics/trianglemesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ class _UnbatchedTriangleDistanceCuda(torch.autograd.Function):
def forward(ctx, points, face_vertices):
num_points = points.shape[0]
num_faces = face_vertices.shape[0]
min_dist = torch.zeros((num_points), device='cuda', dtype=points.dtype)
min_dist_idx = torch.zeros((num_points), device='cuda', dtype=torch.long)
dist_type = torch.zeros((num_points), device='cuda', dtype=torch.int32)
min_dist = torch.zeros((num_points), device=points.device, dtype=points.dtype)
min_dist_idx = torch.zeros((num_points), device=points.device, dtype=torch.long)
dist_type = torch.zeros((num_points), device=points.device, dtype=torch.int32)
_C.metrics.unbatched_triangle_distance_forward_cuda(
points, face_vertices, min_dist, min_dist_idx, dist_type)
ctx.save_for_backward(points.contiguous(), face_vertices.contiguous(),
Expand Down

0 comments on commit 207e187

Please sign in to comment.