Problems with GPU device selection

Hi. I was trying to run the dnn detector sample on the iGPU.
I tried the two provided methods to select GPU device.
Setting the environment variable CUDA_VISIBLE_DEVICES=1 ended up correctly. But the dwContext_selectGPUDevice() method ended up with error. It appears that something is wrong with the ImageStreamer. I checked the ImageStreamer sample and it ended up with the same error.
I simply add dwContext_selectGPUDevice(gpuindex,m_sdk) after the initialization of the context.
I wonder why this is happening. How to use dwContext_selectGPUDevice() correctly?
Thank you so much!

Driveworks exception thrown: DW_CUDA_ERROR: ImageStreamer(CUDA->GL): cannot register GLtexture as resource : operation notsupported

Dear Leostriker,

Please refer to below example.

In drivenet source code, please add below BOLD part and try to test.

/// -----------------------------
    /// Initialize Logger and DriveWorks context
    /// -----------------------------
    void initializeDriveWorks(dwContextHandle_t& context) const
        // initialize logger to print verbose message on console in color

        // initialize SDK context, using data folder
        dwContextParameters sdkParams = {};
        sdkParams.dataPath            = DataPath::get_cstr();

        #ifdef VIBRANTE
        sdkParams.eglDisplay = getEGLDisplay();

        CHECK_DW_ERROR(dwInitialize(&context, DW_VERSION, &sdkParams));
[b]        dwContext_selectGPUDevice(1, context);
        CHECK_DW_ERROR(dwSAL_initialize(&sal, context));[/b]


I’ve tried your code and it still ends up with the same error. If you mean initialize SAL after selecting GPU, it is exactly what i did before.

Hi Leostriker,

Have you got the answer you need to move this issue forward or still waiting our suggestions?
Please update the status then we can know how to support you.