Commit 2e59711
Backport python multihost hlo runner (#402)
* Add `requirements_lock_3_12.txt` to Copybara config.
Include the Python 3.12 requirements lock file in the files managed by Copybara for XLA.
PiperOrigin-RevId: 810924536
(cherry picked from commit d8834a1)
* Use a unique launch ID for every execution.
Reverts 605332e
PiperOrigin-RevId: 799658112
(cherry picked from commit 9d3df67)
* Moves the profile uploading to be before FetchAndLogOutput so no trailing MemcpyD2H will be included in the trace data
PiperOrigin-RevId: 802910040
(cherry picked from commit 6f1b953)
* Allow hlo runner to profile multiple repeats.
- If `num_repeats_with_profiler=3 recreate_profiler_session_between_repeats=false`,
then a single profiling session is created for the last 3 repeats
- If `num_repeats_with_profiler=3 recreate_profiler_session_between_repeats=false`,
then we profile the last 3 repeats with 3 separated profiling sessions.
PiperOrigin-RevId: 802933912
(cherry picked from commit e0f5b99)
* PR openxla#30706: Expose Multi-Host HLO Runner in Python
Imported from GitHub PR openxla#30706
📝 Summary of Changes
Exposes the multi-host runner via nanobind interface for calling by Python programs that register custom calls.
🎯 Justification
HLOs containing custom calls are not executable because the custom call targets are not linked. This change provides a straightforward path by allowing for registration of calls from python.
🚀 Kind of Contribution
✨ New Feature
Copybara import of the project:
--
de1a373 by Michael Goldfarb <[email protected]>:
Expose multihost runner to python.
--
797ee1c by Michael Goldfarb <[email protected]>:
Cleanups.
--
2271761 by Michael Goldfarb <[email protected]>:
Add type registration.
--
d67cf0d by Michael Goldfarb <[email protected]>:
Remove ns.
--
3b8f477 by Michael Goldfarb <[email protected]>:
remove ffi registration from runner.
--
e121e98 by Michael Goldfarb <[email protected]>:
Add back python registration code.
Merging this change closes openxla#30706
COPYBARA_INTEGRATE_REVIEW=openxla#30706 from mgoldfarb-nvidia:mgoldfarb/multihost_runner_py e121e98
PiperOrigin-RevId: 803426356
(cherry picked from commit 09e51fb)
* PR openxla#31074: Expose num_repeats_with_profiler option to Python HLO Runner interface
Imported from GitHub PR openxla#31074
📝 Summary of Changes
Exposes the `num_repeats_with_profiler` which was missed in the first PR.
🎯 Justification
Enables profiling with more than 1 iteration.
🚀 Kind of Contribution
♻️ Cleanup
Copybara import of the project:
--
8960d9b by Michael Goldfarb <[email protected]>:
Expose num_repeats_with_profiler option to Python HLO Runner interface
Merging this change closes openxla#31074
COPYBARA_INTEGRATE_REVIEW=openxla#31074 from mgoldfarb-nvidia:mgoldfarb-nvidia/update_hlo_runner 8960d9b
PiperOrigin-RevId: 804792478
(cherry picked from commit 34386ae)
* PR openxla#32009: [ROCm] fixed the build error on rocm
Imported from GitHub PR openxla#32009
🐛 Bug Fix
Fixed the build error on ROCm, as cupti_tracer is not available on ROCm platform.
It is a separate PR according to the comment in openxla#32002 (comment).
@xla-rotation could you review my PR, please?
Copybara import of the project:
--
d66a44e by Songlin <[email protected]>:
fixed build error on rocm
Merging this change closes openxla#32009
COPYBARA_INTEGRATE_REVIEW=openxla#32009 from ROCm:ci_fixbuild_multihost_hlo_runner_rocm d66a44e
PiperOrigin-RevId: 812790412
(cherry picked from commit 22d1944)
* PR openxla#32336: [ROCm] Move cupti_tracer to cuda dependencies in py_hlo_multihost_runner target
Imported from GitHub PR openxla#32336
📝 Summary of Changes
Move cupti_tracer to cuda dependencies in py_hlo_multihost_runner target
🎯 Justification
This PR fixes building py_hlo_multihost_runner on ROCm, where CUPTI is not available, missed in openxla#32012
🚀 Kind of Contribution
🐛 Bug Fix
@xla-rotation could I get a review for this PR, please?
Copybara import of the project:
--
fdd0217 by Eetu Sjöblom <[email protected]>:
Move cupti_tracer to cuda dependencies
Merging this change closes openxla#32336
COPYBARA_INTEGRATE_REVIEW=openxla#32336 from ROCm:ci_rocm_fix_py_hlo_runner fdd0217
PiperOrigin-RevId: 817277069
(cherry picked from commit 06a2427)
---------
Co-authored-by: Alex Pivovarov <[email protected]>
Co-authored-by: xla authors <[email protected]>
Co-authored-by: Michael Goldfarb <[email protected]>
Co-authored-by: spiao <[email protected]>1 parent c01b39d commit 2e59711
File tree
6 files changed
+690
-13
lines changed- xla/tools/multihost_hlo_runner
6 files changed
+690
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
75 | 73 | | |
76 | 74 | | |
77 | 75 | | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
259 | 258 | | |
260 | 259 | | |
261 | 260 | | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| 581 | + | |
| 582 | + | |
581 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
582 | 590 | | |
583 | 591 | | |
584 | 592 | | |
| |||
592 | 600 | | |
593 | 601 | | |
594 | 602 | | |
595 | | - | |
| 603 | + | |
596 | 604 | | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | 605 | | |
601 | | - | |
| 606 | + | |
602 | 607 | | |
603 | 608 | | |
604 | 609 | | |
605 | 610 | | |
606 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
607 | 617 | | |
608 | 618 | | |
609 | 619 | | |
610 | 620 | | |
611 | 621 | | |
612 | 622 | | |
613 | 623 | | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
614 | 632 | | |
615 | 633 | | |
616 | 634 | | |
617 | | - | |
| 635 | + | |
618 | 636 | | |
619 | 637 | | |
620 | 638 | | |
| |||
638 | 656 | | |
639 | 657 | | |
640 | 658 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | 659 | | |
645 | 660 | | |
646 | 661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
252 | 259 | | |
253 | 260 | | |
254 | 261 | | |
| |||
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
868 | 869 | | |
869 | 870 | | |
870 | 871 | | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
871 | 922 | | |
872 | 923 | | |
873 | 924 | | |
| |||
0 commit comments