Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specialize Base.to_index for AnyCuArray{Bool} #724

Merged
merged 2 commits into from
Feb 23, 2021

Conversation

pabloferz
Copy link
Contributor

@pabloferz pabloferz commented Feb 19, 2021

Fixes #106 and fixes #131. It is not he most performant solution as discussed in #131.

Probably a better solution would be to revert this Base.to_index specialization, check if there are LogicalIndexes among the results of to_indicices in setindex!(::CuArray, ...), and have a specialized kernel for _setindex! and LogicalIndex in GPUArrays.jl, but I guess that can be improved later.

@maleadt

@maleadt maleadt added cuda array Stuff about CuArray. enhancement New feature or request labels Feb 19, 2021
@maleadt
Copy link
Member

maleadt commented Feb 19, 2021

Sounds good for now, thanks! Maybe add a # TODO comment in the code with some details though?

@pabloferz
Copy link
Contributor Author

Done. (it seems that putting [skip ci] in the commit message didn't work, you might want to cancel that redundant build)

@maleadt
Copy link
Member

maleadt commented Feb 19, 2021

@maleadt maleadt merged commit eeb7027 into JuliaGPU:master Feb 23, 2021
@pabloferz pabloferz deleted the pz/logical_indexing branch February 23, 2021 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda array Stuff about CuArray. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assignment using logical indexing Logical indexing per-dim
2 participants