Repository navigation
Keep the block-0 index in range in the scan and findall kernels - #214
Open
SimonDanisch wants to merge 2 commits into
Open
SimonDanisch wants to merge 2 commits into
SimonDanisch wants to merge 2 commits into
Conversation
Member
Author
|
Any blockers to get this merged and tagged? |
This branch has not been deployed
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.
scan_tile_kernel!and thefindallkernel read the previous block's result asiblock == 0 ? start : tile_prefixes[iblock](andblock_counts[iblock]). For block 0 thatbranch is not taken, but Mesa's llvmpipe (lavapipe) still runs the load because its address
is uniform over the work-group. Index 0 is one element before the array, so it segfaults when
that page is unmapped (about 1 in 4 runs of
accumulate).This clamps the index to
max(iblock, one(iblock)). Block 0 never uses the value; every otherblock reads the same element as before.
Tested: GPUArrays testsuite groups backed by AK (accumulate, findall, sorting, mapreduce) and
Raycore.jl's tests, 0 failures on llvmpipe and on a 7900 XTX (RADV).