Skip to content

Cuda runtime error during mesh optimization #63

Closed
@vilhub

Description

@vilhub

Hi,

First of all, fantastic work I love it :)
I'm modifying the mesh deformation code to learn a mesh from 2D views. The optimization process starts but after about 100 optimization steps, the code crashes with the following (the log is output with CUDA_LAUNCH_BLOCKING=1).

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-17-d220a60da988> in <module>
     29     # We sample 5k points from the surface of each mesh
     30     sample_trg = sample_points_from_meshes(trg_mesh, 5000)
---> 31     sample_src = sample_points_from_meshes(new_src_mesh, 5000)
     32 

~/coding/python/pytorch3d/env/lib/python3.7/site-packages/pytorch3d/ops/sample_points_from_meshes.py in sample_points_from_meshes(meshes, num_samples, return_normals)
     64             num_samples, replacement=True
     65         )  # (N, num_samples)
---> 66         sample_face_idxs += mesh_to_face[meshes.valid].view(num_valid_meshes, 1)
     67 
     68     # Get the vertex coordinates of the sampled faces.

RuntimeError: cuda runtime error (710) : device-side assert triggered at /pytorch/aten/src/THC/THCGeneral.cpp:313

The error could be related to the other issue here but I'm not sure if it's the same root cause. The error seems to happen at different points in the optimization process depending on parameters like loss weights, optimizer used.

Python : 3.7.5
Pytorch : 1.4.0
CUDA : 10.2
Ubuntu : 19.10

Thanks!

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions