Repository navigation
Allocate findall's result like the searched array - #151
Merged
Merged
Conversation
findall allocated its result on the back-end with KernelAbstractions.allocate, so a GPU array's properties were lost: Metal's findall of an array in private storage returned one in the default storage mode. Allocate it like the searched array instead, as AK's other results are, and not like the predicate's mask, which lives in scratch memory.
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.
findallallocated its result on the back-end withKernelAbstractions.allocate, so a GPU array's properties were lost: on Metal,findallof an array in private storage returned one in the default (shared) storage mode, which fails Metal's own test once GPUArrays 12 routesfindalland logical indexing through AK (JuliaGPU/Metal.jl#1013).The result is now allocated like the searched array, with
_similaras AK's other results are, and not like the predicate's mask, which lives in scratch memory. The CPU path is unchanged.Verified on an M1 for both storage modes (predicate and
Boolforms, logical indexing, empty results);cpu/findallandcuda/findallpass. Bumps the version to 0.5.2.