Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing cuda_provider_factory.h file in release for windows gpu #1373

Closed
dgarlor opened this issue Jul 10, 2019 · 8 comments
Closed

Missing cuda_provider_factory.h file in release for windows gpu #1373

dgarlor opened this issue Jul 10, 2019 · 8 comments
Assignees

Comments

@dgarlor
Copy link

dgarlor commented Jul 10, 2019

Describe the bug
Using the release onnxruntime-win-x64-gpu-0.4.0.zip.
Following the example to execute a model using the C API, I couldn't activate the CUDA provider because cuda_provider_factory.h file is missing.

I found a workaround compiling the project myself and copying the generated file into my include folder (also modifying the #include inside the file)

Urgency
No urgency as I found the workaround but it would be easier for future releases.

System information

  • Windows 10
  • ONNX Runtime installed from (source or binary): binary
  • ONNX Runtime version: 0.4.0
  • Python version: 3.7 (irrelevant)
  • Visual Studio version (if applicable): 2017
  • CUDA/cuDNN version: 9.1 / 7.1

Thanks and good work

@hariharans29
Copy link
Member

Thanks for reporting this.

CC: @pranavsharma @snnn

@shahasad
Copy link
Contributor

resolved by #1461

@OpDaSo
Copy link

OpDaSo commented Apr 21, 2022

I have the same problem with the release version onnxruntime-win-x64-gpu-1.11.0.zip

@5p4k
Copy link

5p4k commented Apr 21, 2022

Also absent from onnxruntime-linux-x64-gpu-1.11.0.

@snnn
Copy link
Member

snnn commented Apr 22, 2022

It is not relevant any more .

#include "onnxruntime_c_api.h"

        OrtCUDAProviderOptionsV2* cuda_options = nullptr;
        api->CreateCUDAProviderOptions(&cuda_options));
        std::unique_ptr<OrtCUDAProviderOptionsV2, decltype(&OrtApis::ReleaseCUDAProviderOptions)> rel_cuda_options(
            cuda_options, &OrtApis::ReleaseCUDAProviderOptions);
        api->SessionOptionsAppendExecutionProvider_CUDA_V2(ortso, cuda_options));

@OpDaSo
Copy link

OpDaSo commented Apr 22, 2022

What is the type of the variable "api"?

I want to run the mnist example (https://github.com/microsoft/onnxruntime-inference-examples/tree/main/c_cxx/MNIST).
Unfortunately, I get the error "Cannot open source file: cuda_provider_factory.h" in the file providers.h line 8.

Do you have an example for using onnxruntime with CUDA in C++?

@snnn
Copy link
Member

snnn commented Apr 22, 2022

const OrtApi* api = OrtGetApiBase()->GetApi(ORT_API_VERSION);

@jywu-msft
Copy link
Member

the examples need to be updated to not include cuda_provider_factory.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants