In point_to_mesh_distance, a call to torch.cuda.synchronize causes a fatal crash on systems without NVIDIA GPUs installed.
This synchronize call seems redundant since the _unbatched_naive_point_to_mesh_distance only gets called if the inputs are not on a CUDA device.
We encountered this when trying to use the CPU wheel at https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.8.0_cpu.html in a CI pipeline on a machine without a GPU.
In
point_to_mesh_distance, a call totorch.cuda.synchronizecauses a fatal crash on systems without NVIDIA GPUs installed.This synchronize call seems redundant since the
_unbatched_naive_point_to_mesh_distanceonly gets called if the inputs are not on a CUDA device.We encountered this when trying to use the CPU wheel at https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.8.0_cpu.html in a CI pipeline on a machine without a GPU.