Modulus.sym ldc example RuntimeError: CUDA error: no CUDA-capable device is detected

After I installed all modules, I tried to run an example case in modulus sym: ldc. I run python and got following error. I did this on my laptop with onboard graphic card. I assume the issue is with “RuntimeError: CUDA error: no CUDA-capable device is detected” and somehow I cannot tell the software to use CPU:

Traceback (most recent call last):

File “”, line 136, in run


File “/home/pasha/.local/lib/python3.8/site-packages/modulus/sym/solver/”, line 173, in solve


File “/home/pasha/.local/lib/python3.8/site-packages/modulus/sym/”, line 535, in _train_loop

loss, losses = self._cuda_graph_training_step(step)

File “/home/pasha/.local/lib/python3.8/site-packages/modulus/sym/”, line 708, in _cuda_graph_training_step

self.warmup_stream = torch.cuda.Stream()

File “/home/pasha/.local/lib/python3.8/site-packages/torch/cuda/”, line 34, in new

return super(Stream, cls).__new__(cls, priority=priority, **kwargs)

RuntimeError: CUDA error: no CUDA-capable device is detected

CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.

For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

Device-side assertions were explicitly omitted for this error check; the error probably arose while initializing the DSA handlers.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Thank you very much for your help,

Hi @pasha.piroozmand

I would highly recommend finding a machine with a GPU. Many of these problems are not able to run on a CPU with out being extremely slow and power hungry. However for LDC it should work. Try adding the following to your config YAML:

cuda_graphs: false

That will eliminate the error given here.