Assistance Needed: Enabling CUDA for Ensenso SDK in Python"

General Information

  • Product: N45-604-16-BL
  • Serial Number: 218077
  • Ensenso SDK Version: 4.1.1023
  • Operating System: Linux (Ubuntu)

Problem / Question

Hi,

I’m trying to enable CUDA support but haven’t been able to figure out how, even after going through various parts of the documentation. I’m using the camera via Python in Visual Studio Code.

It’s probably a straightforward process, but I’d appreciate some guidance on how to set it up properly.

Thanks in advance for your help!

Best regards

Hi @Ha3ndo,

on most platforms, you can and must explicitly enable CUDA by setting the tree node /CUDA/Enabled to true. The value of this node is used by most CUDA-enabled commands as default for their respective CUDA/Enabled parameters.

The python code for setting the node would be:

from nxlib import NxLibItem
from nxlib.constants import *

NxLibItem()[ITM_CUDA][ITM_ENABLED] = True

If you still find that CUDA is disabled, you can check whether NxLib reports it as available and there is no error.

Regards,
Raphael