NVIDIAGameWorks / NVIDIAGameWorks/kaolin

Potentially unnecessary CUDA dependency

Open Beginner friendly
#995 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.2k
Forks
629
Avg merge
53m
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in kaolin/metrics/trianglemesh.py at point_to_mesh_distance and compare the CPU path with the torch.cuda.synchronize call around line 232. Reproduce the failure using the CPU wheel on a machine without an NVIDIA GPU, then verify that CPU inputs complete successfully without the fatal CUDA dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.