Commit c00f690
authored
Add a new ORT API
### Description
Add a new ORT API `GetSessionOptionConfigEntries`.
### Motivation and Context
microsoft#24887 allows plugin-EPs to interface with ORT using a binary stable interface. microsoft#24445 allows an EP to handle the extraction of EP options from the session option configurations. For an EP like VitisAI EP to comply with the requirements,
it is necessary for a plugin-EPs to access all config entries in a session option.
```c++
OrtKeyValuePairs * kvps = nullptr;
auto status = GetSessionOptionConfigEntries(session_option, &kvps);
if(status) {
throw status;
}
std::unique_ptr<OrtKeyValuePairs, void (*)(OrtKeyValuePairs*)>
config_entries(kvps,
ort_api.ReleaseKeyValuePairs);
const char* const* keys = nullptr;
const char* const* values = nullptr;
size_t num_keys = 0;
// Get keys and values from the config entries
Ort::GetApi().GetKeyValuePairs(config_entries.get(), &keys, &values, &num_keys);
for (size_t i = 0; i < num_keys; ++i) {
// process keys[i] and values[i]
}
```GetSessionOptionConfigEntries (microsoft#25277)1 parent a3c3e2f commit c00f690
File tree
4 files changed
+31
-0
lines changed- include/onnxruntime/core/session
- onnxruntime/core/session
4 files changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6074 | 6074 | | |
6075 | 6075 | | |
6076 | 6076 | | |
| 6077 | + | |
| 6078 | + | |
| 6079 | + | |
| 6080 | + | |
| 6081 | + | |
| 6082 | + | |
| 6083 | + | |
| 6084 | + | |
| 6085 | + | |
| 6086 | + | |
| 6087 | + | |
| 6088 | + | |
6077 | 6089 | | |
6078 | 6090 | | |
6079 | 6091 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
281 | 296 | | |
282 | 297 | | |
283 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3632 | 3632 | | |
3633 | 3633 | | |
3634 | 3634 | | |
| 3635 | + | |
| 3636 | + | |
3635 | 3637 | | |
3636 | 3638 | | |
3637 | 3639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
| 693 | + | |
| 694 | + | |
693 | 695 | | |
0 commit comments