_settings.get_as_int("/physics/cudaDevice") return -1

_settings.get_as_int(“/physics/cudaDevice”) return -1 in SimulationContext in extensions, how to fix it?

Hi @user144975 - The method _settings.get_as_int(“/physics/cudaDevice”) is trying to fetch the ID of the CUDA device being used. A return value of -1 often indicates that no CUDA device is selected or available.

This could be due to several reasons:

  1. No CUDA-compatible device is available: In case there is no CUDA-compatible GPU available on your machine, you will need to ensure you have a CUDA-enabled GPU installed.
  2. CUDA is not installed: Ensure you have installed CUDA toolkit on your machine.
  3. CUDA device is not accessible: Depending on the execution environment of the extension, the CUDA device might not be accessible. In such case, ensure your extension has the necessary permissions to access the CUDA device.

Thanks to your reply. It is weird because I am sure my cuda is available, and it works fine in standalone app, I assign the value maually, and it works.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.