Skip to content

Try another mask for GPU overload - #182

Closed
ChrisRackauckas wants to merge 3 commits into
masterfrom
ChrisRackauckas-patch-1
Closed

ChrisRackauckas wants to merge 3 commits into
masterfrom
ChrisRackauckas-patch-1

Conversation

@ChrisRackauckas

Copy link
Copy Markdown
Member

No description provided.

@ma-sadeghi

Copy link
Copy Markdown
Contributor

@ChrisRackauckas It seems that GPUArrays still complains about vec.(A.u[I]). The only workaround that I can think of is:

vecs = vec.(A.u)
return Base.getindex(Adapt.adapt(__parameterless_type(T),reduce(hcat,vecs),size(A.u[1])...,length(A.u))),
                     I, J...)

which is not elegant...

@ChrisRackauckas

Copy link
Copy Markdown
Member Author

I guess so. I don't know why it does that but that's not an awful solution so let's do it.

@ChrisRackauckas

Copy link
Copy Markdown
Member Author

seems to still not work?

@ma-sadeghi

Copy link
Copy Markdown
Contributor

@ChrisRackauckas Yeah, we were missing the reshape bit. But, actually if you replace the return line with:

return A[repeat([:], length(size(A)))...][I,J...]

It's shorter and easier to read. I tested it locally and it works. Wanted to commit, but didn't have permission.

@ChrisRackauckas

Copy link
Copy Markdown
Member Author

Open a new PR.

@ChrisRackauckas
ChrisRackauckas deleted the ChrisRackauckas-patch-1 branch January 4, 2022 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants