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

Remove allowed_getindex when possible, for faster GPU operations #150

Open
albertomercurio opened this issue Sep 28, 2022 · 1 comment
Open

Comments

@albertomercurio
Copy link

Hello,

I'm able to use this package with CUDA Arrays, since the allowed_getindex (for example used here) does not handle the indexing error of the CuArrays. However this slow down the computation, since this process would be transfered and than executed on the CPU.

Is it possible, for example in that for loop I linked, to avoid using the allowed_getindex function? It would be a very good improvement, not only for GPU calculations.

@ChrisRackauckas
Copy link
Member

I mean, it would make it faster to remove it, but it would also make it incorrect. Do you have an idea for how to do it with also keeping the correctness? You do have to somehow change the value by epsilon and put it back, and that will require a kernel call each time.

Also for the allowed_getindex handling, did you follow https://github.com/JuliaDiff/FiniteDiff.jl#note-about-sparse-differentiation-of-gpuarrays-bandedmatrices-and-blockbandedmatrices ?

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

No branches or pull requests

2 participants