-
Notifications
You must be signed in to change notification settings - Fork 6
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
Problem updating neighborhood search on GPU: unsupported call to modify!() #88
Comments
Perhaps defining this temporary workaround would work for now just so the code runs? @inline function PointNeighbors.pushat_atomic!(vov::PointNeighbors.DynamicVectorOfVectors{<:Any, <:CUDA.CuDeviceArray}, i, value)
(; backend, lengths) = vov
@boundscheck checkbounds(vov, i)
# Increment the column length with an atomic add to avoid race conditions.
# Store the new value since it might be changed immediately afterwards by another
# thread.
new_length = CUDA.@atomic lengths[i] += 1
# We can write here without race conditions, since the atomic add guarantees
# that `new_length` is different for each thread.
backend[new_length, i] = value
return vov
end |
|
Wonderful! Both 1) and 2) solved it. After deleting Manifest.toml and updating all packages the redefinition of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was trying to play around with PointNeighbors on the GPU and was running into the following problem. Totally understand that GPU compatibility is still work in progress, so please let me know if this is expected, being worked on, and/or a duplicate of something referenced in another issue e.g. #26. If so, let me know if I should close this issue.
When attempting to run update!() on the GPU, I get an error:
Here's a working example:
Please let me know if I'm doing something wrong here. I assumed the initialization had to happen on the CPU first before adapting to the GPU because I would get the common scalar indexing error, but maybe I am wrong.
Thanks in advance for any help!
The text was updated successfully, but these errors were encountered: