Commit 42dc9fc
feat(compositor): factor output_format into GPU heuristic (#218)
* feat(compositor): factor output_format into GPU heuristic
When the compositor's output_format is NV12 or I420, the GPU path
eliminates the expensive CPU RGBA→YUV conversion entirely (~14% of
CPU time in profiled pipelines). The should_use_gpu() heuristic now
considers this, preferring GPU compositing whenever YUV output is
requested — even for simple scenes that would otherwise stay on CPU.
This addresses the #1 CPU hotspot identified in production profiling:
rgba8_to_nv12_buf at 9.12% + parallel_rows at 5.28% = 14.4% combined.
Signed-off-by: Devin AI <devin@streamkit.dev>
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* ci: cancel superseded workflow runs on same PR
Adds a concurrency group keyed on PR number / branch ref with
cancel-in-progress: true. This prevents the single self-hosted GPU
runner from being blocked by stale jobs when new commits are pushed.
Signed-off-by: Devin AI <devin@streamkit.dev>
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* test(compositor): fix flaky oneshot timing and runtime format tests
Two tests flaked on the self-hosted GPU runner where many tests run
concurrently and compete for CPU:
1. test_oneshot_processes_faster_than_realtime: reduced from 30@30fps
(budget 500ms vs 1000ms real-time = 10% margin) to 10@5fps
(budget 1500ms vs 2000ms real-time = 25% margin). The previous
budget was nearly indistinguishable from per-frame scheduling
overhead (~30ms) under CI load.
2. test_compositor_output_format_runtime_change: increased inter-step
sleeps from 100/50/100ms to 300/200/300ms. The compositor thread
can be starved for CPU when GPU tests run in parallel, so the
original windows were not enough for even one tick to fire.
Signed-off-by: Devin AI <devin@streamkit.dev>
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
---------
Signed-off-by: Devin AI <devin@streamkit.dev>
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-authored-by: StreamKit Devin <devin@streamkit.dev>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>1 parent fbf2084 commit 42dc9fc
File tree
5 files changed
+87
-24
lines changed- .github/workflows
- crates/nodes/src/video/compositor
5 files changed
+87
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1551 | 1551 | | |
1552 | 1552 | | |
1553 | 1553 | | |
1554 | | - | |
1555 | | - | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
1556 | 1560 | | |
1557 | 1561 | | |
1558 | 1562 | | |
1559 | 1563 | | |
1560 | 1564 | | |
1561 | 1565 | | |
| 1566 | + | |
1562 | 1567 | | |
1563 | 1568 | | |
1564 | 1569 | | |
| |||
1567 | 1572 | | |
1568 | 1573 | | |
1569 | 1574 | | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1570 | 1581 | | |
1571 | 1582 | | |
1572 | | - | |
| 1583 | + | |
1573 | 1584 | | |
1574 | 1585 | | |
1575 | 1586 | | |
| |||
1615 | 1626 | | |
1616 | 1627 | | |
1617 | 1628 | | |
| 1629 | + | |
1618 | 1630 | | |
1619 | | - | |
| 1631 | + | |
| 1632 | + | |
1620 | 1633 | | |
1621 | 1634 | | |
1622 | 1635 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
730 | | - | |
| 730 | + | |
731 | 731 | | |
732 | 732 | | |
733 | | - | |
| 733 | + | |
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | | - | |
| 741 | + | |
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
748 | 751 | | |
749 | 752 | | |
750 | 753 | | |
| |||
761 | 764 | | |
762 | 765 | | |
763 | 766 | | |
764 | | - | |
| 767 | + | |
765 | 768 | | |
766 | 769 | | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
767 | 791 | | |
768 | 792 | | |
769 | 793 | | |
| |||
908 | 932 | | |
909 | 933 | | |
910 | 934 | | |
911 | | - | |
| 935 | + | |
| 936 | + | |
912 | 937 | | |
913 | 938 | | |
914 | 939 | | |
915 | 940 | | |
916 | | - | |
| 941 | + | |
917 | 942 | | |
918 | 943 | | |
919 | 944 | | |
| |||
922 | 947 | | |
923 | 948 | | |
924 | 949 | | |
925 | | - | |
| 950 | + | |
926 | 951 | | |
927 | 952 | | |
928 | 953 | | |
929 | 954 | | |
930 | 955 | | |
931 | | - | |
| 956 | + | |
932 | 957 | | |
933 | 958 | | |
934 | 959 | | |
| |||
943 | 968 | | |
944 | 969 | | |
945 | 970 | | |
946 | | - | |
| 971 | + | |
947 | 972 | | |
948 | 973 | | |
949 | 974 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
| |||
606 | 608 | | |
607 | 609 | | |
608 | 610 | | |
| 611 | + | |
609 | 612 | | |
610 | 613 | | |
611 | 614 | | |
| |||
657 | 660 | | |
658 | 661 | | |
659 | 662 | | |
| 663 | + | |
660 | 664 | | |
661 | 665 | | |
662 | 666 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1710 | 1710 | | |
1711 | 1711 | | |
1712 | 1712 | | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
1718 | 1721 | | |
1719 | 1722 | | |
1720 | 1723 | | |
| |||
1749 | 1752 | | |
1750 | 1753 | | |
1751 | 1754 | | |
1752 | | - | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1753 | 1759 | | |
1754 | 1760 | | |
1755 | 1761 | | |
| |||
2496 | 2502 | | |
2497 | 2503 | | |
2498 | 2504 | | |
2499 | | - | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
2500 | 2515 | | |
2501 | 2516 | | |
2502 | 2517 | | |
| |||
2507 | 2522 | | |
2508 | 2523 | | |
2509 | 2524 | | |
2510 | | - | |
| 2525 | + | |
2511 | 2526 | | |
2512 | 2527 | | |
2513 | 2528 | | |
2514 | 2529 | | |
2515 | | - | |
| 2530 | + | |
2516 | 2531 | | |
2517 | 2532 | | |
2518 | 2533 | | |
2519 | 2534 | | |
2520 | | - | |
| 2535 | + | |
2521 | 2536 | | |
2522 | 2537 | | |
2523 | 2538 | | |
| |||
0 commit comments