Repository navigation
Conversation
Member
Author
|
Closing under the maintainer-authorized stalled-PR cleanup. The recorded final isolated AMD EPYC 9V74 result is I420 Rust/C = 1.0744 (paired range 1.0714–1.0810), so this change does not meet #3004’s Rust ≤ C acceptance criterion; the benchmark correctly failed. Passing parity and improvements to NV12/I444 do not satisfy that missing requirement. Keep perf/3004-direct-simd-rows and its benchmark artifacts recoverable. #3004 remains open for a measured I420 optimization and named x86_64/aarch64 acceptance; no threshold is weakened. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #3004
Draft parked: the implementation improves UYVX conversion, but I420 remains 7.4% slower than the C oracle on the final isolated x86 runner. #3004 requires Rust≤C for every conversion on named x86_64 and aarch64 machines, so this PR does not resolve the issue and must not be queued as a completed fix.
The change adds runtime-selected SSE2 (x86_64) and NEON (aarch64) row kernels with the scalar fallback. Each kernel writes directly to borrowed output rows and preserves the C's four-pixel load/store order, including overlapping output rows. A register-only SSE2 packing helper keeps the C instruction sequence because LLVM expanded the equivalent intrinsic expressions into extra shifts/clamps. Its explicit XMM operands use early-clobber constraints, with no memory, stack, or flags effects. Memory accesses remain bounded in the native row kernels.
Measured result
Final x86_64 artifact, commit63f805046, AMD EPYC9V74, three paired
record.pyrepeats, C oracle-O2 -ffp-contract=off -fno-strict-aliasing:The preregistered metric is the existing recorder's median Rust time across three complete repeats divided by median C time across those repeats. Each conversion's aggregate must be ≤1.0; individual paired ranges are reported but not gated. The manual job correctly failed on I420. Evidence: https://github.com/obs-rust/obs-studio/actions/runs/42003496128 (
format-benchmark-ubuntu-26.04-42003496128artifact).Prior final-head native ARM run at4534c5396 passed all 33 format tests on Apple M1 (Virtual), including printed native/scalar selection. Its Rust/C aggregates were0.0874/0.0863/0.0838 for I420/NV12/I444; the C oracle uses scalar SIMDe stand-ins on ARM, so these do not describe a speedup over tuned production NEON C. Actual Rust medians improved from1.37–1.50ms to0.56–0.69ms (~2–2.7×). NEON/shared code is unchanged in the subsequent x86-only fixes. Evidence: https://github.com/obs-rust/obs-studio/actions/runs/42000633802. The63 final matrix's ARM leg may still be finishing; retain its artifact before resuming work.
An earlier isolated EPYC7763 run at4534c5396 rejected all three x86 aggregates (1.3046/1.3618/1.2705). Exact C intrinsic shaping and register-only packing improved that result, but the remaining I420 gap is stable. Busy local-host results were not used to accept the change. The next investigation would need a new measured optimization, not a weaker bound.
Validation
Native measurement is an explicit
format-benchmarkchoice in the existing Dispatch workflow. A read-only repository-gated job checks an ancestor baseline SHA, measures base and candidate sequentially in one checkout on ubuntu-26.04/macOS26, runs forced format parity, and always retains machine/compiler metadata, logs and JSON. Tests cover input rejection, actual checkout restoration after probe failure, cache policy, and the exact1.0 threshold. No new workflow file, public C header, existing C test, or public API was changed. There is no user-visible behavior change.