Cannot initialize CPU -> CUDA dwImageStreamer on Drive PX2 target . CUDA is trying to allocate 20...

Hi,

I am having a strange problem with driveworks-0.6 when initializing a CPU → CUDA dwImageStreamer on the Drive PX2 target. The crosscompile SDK and targetfs was installed using DriveInstall 5.0.5.0 on Ubuntu 16.04.

With the following code I get a DW_CUDA_ERROR exception, saying that cuda is trying to allocate ~20 GB of memory. I can initialize and use a CPU > GL stream with the same properties without any issues.

dwStatus result = DW_FAILURE;

    dwImageProperties properties;
    properties.width = 1280;
    properties.height = 800;
    properties.pxlFormat = DW_IMAGE_RGBA;
    properties.pxlType = DW_TYPE_UINT8;
    properties.planeCount = 1;
    properties.type = DW_IMAGE_CPU;

    //stream from CPU -> CUDA
    result = dwImageStreamer_initialize(&m_cpu2cuda, &properties, DW_IMAGE_CUDA, context);
    if (result != DW_SUCCESS) {
        throw std::runtime_error(std::string("Cannot init image streamer cpu-cuda: ") + dwGetStatusName(result));
    }

I get the following error:

Driveworks exception thrown: DW_CUDA_ERROR: Cannot allocate cuda pitch memory, bytes 21849308160: out of memory.

Hi gordon.koefner,
From the snippet, It seems you are allocating just 32MB size image. Can you please raise a bug with sufficient information to investigate it furthur.

Can you please check if the application runs if you set CUDA_VISIBLE_DEVICES=1 in terminal.

Where can I find the bugtracker for DriveWorks?

Hi gordon.koefner,
You can raise bug via NVIDIA DRIVE Solutions for Autonomous Vehicles | NVIDIA Developer account or via NVonline

Unfortunately I cannot find a link to a bugtracker in NVIDIA DRIVE Solutions for Autonomous Vehicles | NVIDIA Developer, only the categories: DEVELOP, ECOSYSTEM, SUPPORT, DOWNLOAD, DOCUMENTATION, LEARN.

NVonline is not an option as my login credentials for developer.nvidia.com do not work for nvdeveloper.nvidia.com.

Dear gordon.koefner,
Please login to https://developer.nvidia.com/drive with your credentials. Please check MyAccount->MyBugs->Submit a new bug

Dear gordon.koefner,
Do you still have this issue? If so, can you provide steps to reproduce the in the Bug.

Hi, for some reason I cannot open the bug, I receive a page not found error so I will have to reply here.

I have not tested it since first reporting it, but I assume the issue hasn’t fixed itself.
Is there a driveworks update available? If so I can try next week.

The steps to reproduce the issue is the code from the first post.
It is a snippet from the CTOR of a class implementing ISensorIO from the dnn_common samples. Along the lines of what is done in SensorIOCuda.

Dear gordon.koefner,
The code snippet provided by you is not giving any clues about the problem. Please paste a code snippet which can produce the bug on our side.

I am not sure I understand you correctly. The above snippet 100% produces the bug on my side, with the environment (sdk, hardware version) mentioned above. What it does on your side is impossible for me to know or test and is hardly my concern.

Possibly you have different drivers on you DrivePX that don’t have this issue?

I have already built a workaround and I do not have a lot of time to spend on this as I have moved on to other topics since first posting this issue over half a year ago. If you cannot reproduce the bug the typical method is to let me know what information is missing to determine a difference in the runtime environment and go from there.