Commit 8caee1c
Fix optimize CLI to set system EP and device (microsoft#2418)
## Describe your changes
Fix the `olive optimize` CLI to properly configure the system execution
provider and device in the generated workflow config.
- `_update_system_config` now creates the `local_system` with the
specified execution provider and optional device. Previously only the
QNN AOT case was handled, leaving the system config empty.
- When model builder is used as the exporter, the `OnnxFloatToFloat16`
pass is skipped since model builder already produces the model in fp16.
- `test_optimize_cli_pass_list` now verifies the system EP and device
are correctly set in the generated config for all test cases.
## Checklist before requesting a review
- [x] Add unit tests for this change.
- [x] Make sure all tests can pass.
- [ ] Update documents if necessary.
- [x] Lint and apply fixes to your code by running `lintrunner -a`
- [x] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.
- `olive optimize` now correctly sets the target system execution
provider and device.
## (Optional) Issue link
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 40d860e commit 8caee1c
2 files changed
Lines changed: 51 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
297 | 310 | | |
298 | 311 | | |
299 | 312 | | |
| |||
622 | 635 | | |
623 | 636 | | |
624 | 637 | | |
625 | | - | |
| 638 | + | |
626 | 639 | | |
627 | 640 | | |
628 | 641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
| 497 | + | |
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
| |||
504 | 506 | | |
505 | 507 | | |
506 | 508 | | |
| 509 | + | |
| 510 | + | |
507 | 511 | | |
508 | 512 | | |
509 | 513 | | |
| |||
515 | 519 | | |
516 | 520 | | |
517 | 521 | | |
| 522 | + | |
| 523 | + | |
518 | 524 | | |
519 | 525 | | |
520 | 526 | | |
521 | 527 | | |
522 | 528 | | |
| 529 | + | |
| 530 | + | |
523 | 531 | | |
524 | 532 | | |
525 | 533 | | |
526 | 534 | | |
527 | 535 | | |
| 536 | + | |
| 537 | + | |
528 | 538 | | |
529 | 539 | | |
530 | 540 | | |
| |||
536 | 546 | | |
537 | 547 | | |
538 | 548 | | |
| 549 | + | |
| 550 | + | |
539 | 551 | | |
540 | 552 | | |
541 | 553 | | |
542 | 554 | | |
543 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
544 | 565 | | |
545 | 566 | | |
546 | 567 | | |
| |||
549 | 570 | | |
550 | 571 | | |
551 | 572 | | |
| 573 | + | |
| 574 | + | |
552 | 575 | | |
553 | 576 | | |
554 | 577 | | |
| |||
577 | 600 | | |
578 | 601 | | |
579 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
580 | 617 | | |
581 | 618 | | |
582 | 619 | | |
| |||
0 commit comments