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

[Documentation] Execution provider strings #22101

Open
thewh1teagle opened this issue Sep 15, 2024 · 5 comments
Open

[Documentation] Execution provider strings #22101

thewh1teagle opened this issue Sep 15, 2024 · 5 comments
Labels
documentation improvements or additions to documentation; typically submitted using template ep:CoreML issues related to CoreML execution provider ep:DML issues related to the DirectML execution provider stale issues that have not been addressed in a while; categorized by a bot

Comments

@thewh1teagle
Copy link

Describe the documentation issue

It's not clear what should be the execution providers strings in Python.
Eg. I want to enable DirectML or CoreML. I can see them here https://onnxruntime.ai/docs/execution-providers/
But I don't see any mention for the exact string value that should passed eg CUDAExecutionProvider

Page / URL

https://onnxruntime.ai/docs/api/python/api_summary.html#load-and-run-a-model

@thewh1teagle thewh1teagle added the documentation improvements or additions to documentation; typically submitted using template label Sep 15, 2024
@github-actions github-actions bot added ep:CoreML issues related to CoreML execution provider ep:DML issues related to the DirectML execution provider labels Sep 15, 2024
@fdwr
Copy link
Contributor

fdwr commented Sep 17, 2024

https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/graph/constants.h#L32-L55

constexpr const char* kCpuExecutionProvider = "CPUExecutionProvider";
constexpr const char* kCudaExecutionProvider = "CUDAExecutionProvider";
constexpr const char* kCudaNHWCExecutionProvider = "CUDANHWCExecutionProvider";
constexpr const char* kDnnlExecutionProvider = "DnnlExecutionProvider";
constexpr const char* kOpenVINOExecutionProvider = "OpenVINOExecutionProvider";
constexpr const char* kVitisAIExecutionProvider = "VitisAIExecutionProvider";
constexpr const char* kTensorrtExecutionProvider = "TensorrtExecutionProvider";
constexpr const char* kNnapiExecutionProvider = "NnapiExecutionProvider";
constexpr const char* kQnnExecutionProvider = "QNNExecutionProvider";
constexpr const char* kRknpuExecutionProvider = "RknpuExecutionProvider";
constexpr const char* kDmlExecutionProvider = "DmlExecutionProvider";
constexpr const char* kMIGraphXExecutionProvider = "MIGraphXExecutionProvider";
constexpr const char* kAclExecutionProvider = "ACLExecutionProvider";
constexpr const char* kArmNNExecutionProvider = "ArmNNExecutionProvider";
constexpr const char* kRocmExecutionProvider = "ROCMExecutionProvider";
constexpr const char* kCoreMLExecutionProvider = "CoreMLExecutionProvider";
constexpr const char* kJsExecutionProvider = "JsExecutionProvider";
constexpr const char* kSnpeExecutionProvider = "SNPEExecutionProvider";
constexpr const char* kTvmExecutionProvider = "TvmExecutionProvider";
constexpr const char* kXnnpackExecutionProvider = "XnnpackExecutionProvider";
constexpr const char* kWebNNExecutionProvider = "WebNNExecutionProvider";
constexpr const char* kCannExecutionProvider = "CANNExecutionProvider";
constexpr const char* kAzureExecutionProvider = "AzureExecutionProvider";
constexpr const char* kVSINPUExecutionProvider = "VSINPUExecutionProvider";

@thewh1teagle
Copy link
Author

@fdwr
Copy link
Contributor

fdwr commented Sep 18, 2024

Can you add this link to the Python docs?

I'm not sure who is in charge of Python documentation, but maybe @natke would know, or maybe @scottmckay would know from the CoreML angle.

@jywu-msft
Copy link
Member

jywu-msft commented Sep 18, 2024

https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.get_all_providers

>>> import onnxruntime
>>> onnxruntime.get_all_providers()
['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'MIGraphXExecutionProvider', 'ROCMExecutionProvider', 'OpenVINOExecutionProvider', 'DnnlExecutionProvider', 'TvmExecutionProvider', 'VitisAIExecutionProvider', 'QNNExecutionProvider', 'NnapiExecutionProvider', 'VSINPUExecutionProvider', 'JsExecutionProvider', 'CoreMLExecutionProvider', 'ArmNNExecutionProvider', 'ACLExecutionProvider', 'DmlExecutionProvider', 'RknpuExecutionProvider', 'WebNNExecutionProvider', 'XnnpackExecutionProvider', 'CANNExecutionProvider', 'AzureExecutionProvider', 'CPUExecutionProvider']

https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.get_available_providers

>>> import onnxruntime
>>> onnxruntime.get_available_providers()
['DmlExecutionProvider', 'CPUExecutionProvider']

Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation improvements or additions to documentation; typically submitted using template ep:CoreML issues related to CoreML execution provider ep:DML issues related to the DirectML execution provider stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

3 participants