Closed nckoff closed 2 months ago
Hi @nckoff,
Have you solved the issue? Because I am facing the same problem.
Thanks,
Have you installed the cuda library on your Windows platform and successfully run the Nvidia sample code?
Hi @iwaitu,
I installed cuda from this link: https://developer.nvidia.com/cuda-downloads. Where can I found the Nvidia sample code?
Thanks,
I have followed the video and I have run the examples correctly, but the program still gives me the same error.
Where the weight file come from? Maybe you should try to export your own onnx file by use your custom pt file.
Hi @iwaitu ,
The weights are custom weights. I have obtained a .pt first and transformed to .onnx to use it with c#. The problem is that set useCuda = False the program works. But it uses the CPU so it is really slow. That's why I want to use the GPU, setting the useCuda = True, but it gives me the error.
the problem is your export params, before you export your onnx file,you should try this:
model.cuda()
mode.eval()
If i choose useCuda = True
Microsoft.ML.OnnxRuntime 1.11.0:
I thought I needed Microsoft.ML.OnnxRuntime.Gpu Microsoft.ML.OnnxRuntime.Gpu 1.11.0:
Microsoft.ML.OnnxRuntime.Gpu 1.13.1:
I tried on different devices Windows 10/11 Please, help.
Hey there, I had the exact same issue. This is because you either don't have CUDA and CudNN not installed or the PATH environment variable doesn't have the paths of the CUDA and CudNN binaries.
I have manually added the required files to my project. For me it looks like this:
Depending on the version, you might need different files.
If you have successfully exported the ONNX file and correctly installed CUDA and cuDNN, then you need to add Microsoft.ML.OnnxRuntime.Gpu to your project.
If i choose useCuda = True
Microsoft.ML.OnnxRuntime 1.11.0:![0688_688_2022_12_10_Vision_v1pMV1d0Af](https://user-images.githubusercontent.com/92748912/206864106-0ad4d807-61f5-4458-b299-b14e49aa3bb5.jpg)
I thought I needed Microsoft.ML.OnnxRuntime.Gpu Microsoft.ML.OnnxRuntime.Gpu 1.11.0:![0689_689_2022_12_10_Vision_GtZk2jFSA8](https://user-images.githubusercontent.com/92748912/206864207-66f509f3-c7c0-4d5b-97de-cfaa827dac2b.jpg)
Microsoft.ML.OnnxRuntime.Gpu 1.13.1:![0690_690_2022_12_10_Vision_TlLTUM39Vu](https://user-images.githubusercontent.com/92748912/206864248-ef98e954-ad39-4ec9-b6ca-c5dbc42f21fa.jpg)
I tried on different devices Windows 10/11 Please, help.