Repository navigation
upscale: vector EASU and RCAS under GOEXPERIMENT=simd (3x) - #143
Merged
Merged
Conversation
1280x720 -> 1920x1080 on one Ryzen 9 7950X core: 242 ms scalar, 82 ms with the portable Go 1.27 simd package (EASU alone 193 -> 73 ms). The vector rows are chosen at init, so the scalar build keeps 100% coverage and no branch in run(). Tests compare both rows with the scalar code under ErrorBound, including NaN lobes on black rings and ragged widths. Also an exact flat shortcut in easuPixel. Refs #141 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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 #141. Vector EASU and RCAS rows for
upscaleunderGOEXPERIMENT=simd(portable Go 1.27simd: AVX2/AVX-512 on amd64, NEON on arm64). The default build stays scalar; the vector rows are installed atinit, sorunhas no branch and the scalar build keeps 100% coverage.Measured on fractal (Ryzen 9 7950X,
taskset -c 9, load about 2, go1.27.4), 1280x720 to 1920x1080, one frame:GOEXPERIMENT=simd3x faster in total (EASU 2.6x, RCAS about 19x). Not within 2x of ffmpeg: about 30x remain. The profile shows the per-pixel 12-tap gather (scalar loads into lane buffers) dominating
easuRowVec; the scalar step alone (no per-pixel interface calls, planar float32) was already in v0.21.0.Tests:
TestVectorMatchesScalar(EASU, ragged widths) andTestRCASVectorMatchesScalar(NaN lobes on black rings) compare against the scalar code withinErrorBound. FMA contraction moves results by up to 1.1e-4 against the oracle, soErrorBoundwas already raised to 2e-4.Deviation: the lane kernels here are FSR-specific (direction/length/weight arithmetic, RCAS lobe), so they stay in avkit rather than go-videodsp or go-simd. A generic 2D gather would be the kernel to hoist; it is the next step for the remaining gap.
🤖 Generated with Claude Code