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

feat: allowed to apply multiple execution providers #81

Merged
merged 1 commit into from
Aug 20, 2023
Merged

feat: allowed to apply multiple execution providers #81

merged 1 commit into from
Aug 20, 2023

Conversation

DCjanus
Copy link
Contributor

@DCjanus DCjanus commented Aug 20, 2023

My Code like this, the model from here.

let environment = Environment::builder()
    .with_name("name")
    .with_execution_providers([
        ExecutionProvider::CUDA(Default::default()),
        ExecutionProvider::CPU(Default::default()),
    ])
    .build()
    .expect("build environment failed")
    .into_arc();
let detect_session = SessionBuilder::new(&environment)
    .expect("create session builder failed")
    .with_model_from_memory(include_bytes!("../models/det_10g.onnx"))
    .expect("load model failed");

Got this warning:

2023-08-20T16:57:32.243882Z  INFO ort: Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.

According this issue, maybe we should allowed to register multiple execution providers.

I am not familiar with machine learning, so if you think this is a bad idea, please let me know.

@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Merging #81 (62e86f5) into main (c0831c7) will increase coverage by 0.13%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
+ Coverage   52.15%   52.28%   +0.13%     
==========================================
  Files          13       13              
  Lines        1091     1094       +3     
==========================================
+ Hits          569      572       +3     
  Misses        522      522              
Files Changed Coverage Δ
src/execution_providers.rs 56.96% <100.00%> (+1.69%) ⬆️

@decahedron1 decahedron1 merged commit 561870a into pykeio:main Aug 20, 2023
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

Successfully merging this pull request may close these issues.

2 participants