mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-14 18:12:05 +00:00
update according to the C++ API change for SNPE EP. (#11915)
update according to the C++ API change for SNPE EP. AppendExecutionProvider_SNPE -> AppendExecutionProvider
This commit is contained in:
parent
782c90d6d4
commit
33d47609c4
1 changed files with 4 additions and 7 deletions
|
|
@ -54,14 +54,11 @@ The SNPE Execution Provider supports a number of options to set the SNPE Runtime
|
|||
### C++
|
||||
```
|
||||
Ort::Env env = Ort::Env{ORT_LOGGING_LEVEL_ERROR, "Default"};
|
||||
std::vector<const char*> snpe_option_keys;
|
||||
std::vector<const char*> snpe_option_values;
|
||||
snpe_option_keys.push_back("runtime");
|
||||
snpe_option_values.push_back("DSP");
|
||||
snpe_option_keys.push_back("buffer_type");
|
||||
snpe_option_values.push_back("FLOAT");
|
||||
std::unordered_map<std::string, std::string> snpe_options;
|
||||
snpe_options["runtime"] = "DSP";
|
||||
snpe_options["buffer_type"] = "FLOAT";
|
||||
Ort::SessionOptions session_options;
|
||||
session_options.AppendExecutionProvider_SNPE(snpe_option_keys.data(), snpe_option_values.data(), snpe_option_keys.size());
|
||||
session_options.AppendExecutionProvider("SNPE", snpe_options);
|
||||
Ort::Session session(env, model_path, session_options);
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue