Commit 5f94d6c
authored
Improve error message when EPContext node is not assigned to an EP (microsoft#27474)
### Description
Improves the error message returned by ORT when loading a compiled model
in a session that does not have the required execution provider(s).
For example, ORT now returns the following error when creating session
with a model compiled explicitly for OpenVINO EP without adding OpenVINO
EP to the session:
> EPContext node generated by 'OpenVINOExecutionProvider' is not
compatible with any execution provider added to the session. EPContext
node name: 'EPContextNode0'. Available session execution providers:
[CPUExecutionProvider].
Compare the above message with the more generic message that is
currently returned:
>Could not find an implementation for EPContext(1) node with name
'EPContextNode0'
### Motivation and Context
Improves diagnosability when loading of pre-compiled models fails.
Specifically, the ambiguity of the original message led to many hours
spent debugging an error where a compiled model failed to run because
the expected `OrtEpDevice` was inadvertently not added to a session.1 parent a16cf05 commit 5f94d6c
2 files changed
Lines changed: 88 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
1260 | | - | |
| 1260 | + | |
| 1261 | + | |
1261 | 1262 | | |
1262 | 1263 | | |
1263 | 1264 | | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1264 | 1295 | | |
1265 | 1296 | | |
1266 | 1297 | | |
| |||
1280 | 1311 | | |
1281 | 1312 | | |
1282 | 1313 | | |
1283 | | - | |
| 1314 | + | |
1284 | 1315 | | |
1285 | 1316 | | |
1286 | 1317 | | |
| |||
1299 | 1330 | | |
1300 | 1331 | | |
1301 | 1332 | | |
1302 | | - | |
| 1333 | + | |
| 1334 | + | |
1303 | 1335 | | |
1304 | 1336 | | |
1305 | 1337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
400 | 401 | | |
401 | 402 | | |
402 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
403 | 456 | | |
404 | 457 | | |
405 | 458 | | |
| |||
0 commit comments