CUDA ERROR

Hey guys,
out of no where I get following error, when trying to run CHECK_DW_ERROR(dwInitialize(&m_context, m_sdkVersion, NULL));:

terminate called after throwing an instance of 'std::runtime_error'
  what():  [2024-11-05 15:50:15] DW Error DW_CUDA_ERROR executing DW function:
 dwInitialize(&m_context, m_sdkVersion, NULL)

I hope you can help me with this problem.
Thanks in advance!

Dear @0b.d3 ,
Is this issue noticed on target? Could you check running CUDA deviceQuery sample(/usr/local/cuda/samples/1_Utilities/deviceQuery) to confirm if GPU is detected?

Dear @SivaRamaKrishnaNV,

yes, I am executing the code in an IDE on the target.
I tried the command you recommended and the GPU was recognized. I also ran sample_hello_world and everything went fine.

This indicates CUDA initialization is failing. I am assuming you tested deviceQuery on tatget. Can you check running the application directly on target instead of via IDE? If issue persists, can you share the sample code to repro the issue.

Yes, after I ran the application on the target I get the same error.
My Application just looks like this:

int main(int argc, char **argv)

{
dwContextHandle_t m_context = DW_NULL_HANDLE;
dwVersion m_sdkVersion;

CHECK_DW_ERROR(dwGetVersion(&m_sdkVersion));
CHECK_DW_ERROR(dwInitialize(&m_context, m_sdkVersion, NULL));
std::cout << "Context of Driveworks SDK successfully initialized." <<std::endl;

dwRelease(&m_context);

return 0;

}

I am coding in VS Code and downloaded Nsight Visual Studio Code Edition, maybe this is part of the problem?

Dear @0b.d3 ,
I have not tested NVSCE to debug driveworks. Are you using windows or linux to launch IDE?

Could you check cross compiling your application like a driveworks sample on docker and run the binary on target directly?