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

Use AppendExecutionProvider_Dnnl api to add onednn EP,No success. #21958

Open
yunhaolsh opened this issue Sep 2, 2024 · 3 comments
Open

Use AppendExecutionProvider_Dnnl api to add onednn EP,No success. #21958

yunhaolsh opened this issue Sep 2, 2024 · 3 comments
Labels
ep:oneDNN questions/issues related to DNNL EP stale issues that have not been addressed in a while; categorized by a bot

Comments

@yunhaolsh
Copy link

Describe the issue

First i use commond '--use dnnl' to build a onnxruntime.dll enable oneDNN support.
When i use this code to register a dnnl EP to ORT:
int threadNum = 4;
bool enable_cpu_mem_arena = true;
OrtDnnlProviderOptions dnnl_option = { enable_cpu_mem_arena, static_cast<void*>(&threadNum)};
session_options.AppendExecutionProvider_Dnnl(dnnl_option);
session_options.SetIntraOpNumThreads(4);
session_options.EnableProfiling(L"det_Profiling");
session = Ort::Session(env, model_path.c_str(), session_options);
From det_Profiling.json i find threr always is "provider" : "CPUExecutionProvider",
When i use
GetAvailableProviders()
I got "DnnlExecutionProvider" and "CPUExecutionProvider"
How can i use DnnlExecutionProvider as my EP?
Why my Profiling file always is "provider" : "CPUExecutionProvider"?
Is there something miss to config with ORT session? Thanks.

To reproduce

First i use commond '--use dnnl' to build a onnxruntime.dll enable oneDNN support.
When i use this code to register a dnnl EP to ORT:
int threadNum = 4;
bool enable_cpu_mem_arena = true;
OrtDnnlProviderOptions dnnl_option = { enable_cpu_mem_arena, static_cast<void*>(&threadNum)};
session_options.AppendExecutionProvider_Dnnl(dnnl_option);
session_options.SetIntraOpNumThreads(4);
session_options.EnableProfiling(L"det_Profiling");
session = Ort::Session(env, model_path.c_str(), session_options);
From det_Profiling.json i find threr always is "provider" : "CPUExecutionProvider",
When i use
GetAvailableProviders()
I got "DnnlExecutionProvider" and "CPUExecutionProvider"
How can i use DnnlExecutionProvider as my EP?
Why my Profiling file always is "provider" : "CPUExecutionProvider"?
Is there something miss to config with ORT session? Thanks.

Urgency

No response

Platform

Windows

OS Version

windows 11

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

18.1

ONNX Runtime API

C++

Architecture

X64

Execution Provider

oneDNN

Execution Provider Library Version

No response

@github-actions github-actions bot added the ep:oneDNN questions/issues related to DNNL EP label Sep 2, 2024
@yunhaolsh
Copy link
Author

yunhaolsh commented Sep 2, 2024

Dose the ExecutionOrder execution_order matters?
Now is ExecutionOrder::DEFAULT,
Is there interface to set ExecutionOrder?

@yunhaolsh
Copy link
Author

someone can helpe me?

Copy link
Contributor

github-actions bot commented Oct 6, 2024

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 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:oneDNN questions/issues related to DNNL EP stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

1 participant