Add SSE inverse residue schedule and scheduled inverse dispatch#34
Merged
falseywinchnet merged 1 commit intoJun 21, 2026
Conversation
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.
Motivation
Description
INV_RES_SCHEDULEtable andbuild_inverse_residue_schedule()that reversesFWD_RES_SCHEDULEand appends a final inverse binomial to form the exact inverse stream.run_inv_residue_scheduleandrun_inv_residue_schedule_f32that walkINV_RES_SCHEDULEand call the inverse kernels (norm2_inv_fused,codelet_d3_tw_res_inv,binomial_inv, etc.), and add__builtin_prefetchhints for the next base.build_forward_schedules()now buildsINV_RES_SCHEDULE) and gate use of the flat scheduled inverse with#if BRUUN_LEVEL == 1so SSE/NEON use the schedule while AVX2/AVX-512 retain the existing recursive path.src/detail/inverse_acceleration_notes.txtdocumenting the decisions, ISA gating, and follow-up optimization candidates.Testing
make testwhich built the library and rantests/correctnessandtests/api_c, both completing successfully on the AVX2 build.make BUILD_DIR=build-sse AUTO_SIMD_FLAGS='-msse2 -mno-avx'), ranbuild-sse/examples/benchmark 65536 7, and observed improved SSE round-trip timings versus the previous SSE build.examples/benchmark 65536 7) and observed that AVX2 performance did not improve with the flat schedule on this host, so the recursive inverse path remains enabled for wide-vector backends.make asm-checkand inspected therun_inv_residue_schedule/ codelet output to verify vectorized code paths and that prefetch hints are emitted.Codex Task