[Edited] Optix SDK: Enable CPU ?

In the SDK 3.5.1 examples there is an option “-CPU” described as “Enable CPU execution of OptiX programs. The number of threads can be set with --num-devices.”

In the code, it calls “m_scene->enableCPURendering(true)”

If I try this option I get this error:

“Optix Error: Attempting to enable CPU mode, but no CPU device found”

Sound very interesting, it reminds me “CPU Fallback



[EDIT2] How to run CUDA in Emulation Mode? Found some hints HERE

[EDIT] The error message derives form HERE:

SampleScene::enableCPURendering(bool enable)
  // Is CPU mode already enabled
  std::vector<int> devices = m_context->getEnabledDevices();
  bool isCPUEnabled = false;
  for(std::vector<int>::const_iterator iter = devices.begin(); iter != devices.end(); ++iter)
    if (m_context->getDeviceName(*iter) == "CPU") {
      isCPUEnabled = true;

  // Already in desired state, good-bye.
  if (isCPUEnabled == enable)

  if (enable)
    // Turn on CPU mode

    int ordinal;
    for(ordinal = m_context->getDeviceCount()-1; ordinal >= 0; ordinal--)
      if (m_context->getDeviceName(ordinal) == "CPU") {
    if (ordinal < 0)
      throw Exception("Attempting to enable CPU mode, but no CPU device found");
    m_context->setDevices(&ordinal, &ordinal+1);
  } else
    // Turn off CPU mode

    // For now, simply grab the first device
    int ordinal = 0;
    m_context->setDevices(&ordinal, &ordinal+1);

  // Check this here, in case we failed to make it into GPU mode.


In a question posted by you, CPU mode is not yet there:

ah, you even linked there. In this case I have no idea what this thread is about. They will implement new features depending on what people selected in the survey from the 3.5 release.

I know … maybe they can change their mind for the 4.0 release…