drjit icon indicating copy to clipboard operation
drjit copied to clipboard

[❔ other question] How to suppress import warning when no CUDA-enabled device is available?

Open leroyvn opened this issue 3 years ago • 0 comments

Description

I'm using Dr.Jit on a machine without a CUDA-enabled device. I made sure to set export CUDA_VISIBLE_DEVICES="", but I'm still getting the following warning message upon import:

jit_cuda_init(): cuInit failed, disabling CUDA backend.
There are two common explanations for this type of failure:

 1. your computer simply does not contain a graphics card that supports CUDA.

 2. your CUDA kernel module and CUDA library are out of sync. Try to see if you
    can run a utility like 'nvida-smi'. If not, a reboot will likely fix this
    issue. Otherwise reinstall your graphics driver.

 The specific error message produced by cuInit was
   "no CUDA-capable device is detected"

So I have two questions:

  • Is this behaviour intended?
  • If so, how can I fix my system or hide this warning message?

System configuration

  • Dr.Jit version: 0.2.1 (from PyPI)
  • OS: Ubuntu 20.04
  • Python version: 3.10.5

leroyvn avatar Jul 20 '22 13:07 leroyvn