Add compile-time tiling primitive and use it in the 1D reduce - #107
Draft
shreyas-omkar wants to merge 1 commit into
Draft
Add compile-time tiling primitive and use it in the 1D reduce#107shreyas-omkar wants to merge 1 commit into
shreyas-omkar wants to merge 1 commit into
Conversation
shreyas-omkar
force-pushed
the
sh/backend-specialize
branch
from
August 6, 2026 05:18
02730e1 to
ec42890
Compare
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.
Port GemmKernels.jl's
Tile(shape in thesizetype parameter, position in the dynamicbase/offsetfields) as an internalTilingmodule, keeping the sametranslate_base/translate_offset/tile.indexcalling convention.Use it in
_mapreduce_block!to loaditems_per_threadelements per thread in a block-strided pass. The default of 2 reproduces the previous two-element load byte-for-byte (op(neutral, x) == x); a newitems_per_threadkeyword and a_default_items_per_thread(backend)trait let backends/users opt into more.Correct on POCL and CUDA across ops/sizes; ~1.6x faster at K=4 on an RTX 3060 (64M Int32 sum: 1.36 -> 0.85 ms), unchanged at the default.