-
Notifications
You must be signed in to change notification settings - Fork 221
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
unsafe_copy3d!: srcPos and dstPos handling #27
Comments
@maleadt, I hope I was clear above: all that needs to be done in the code is to
with
and
with
Then, maybe it is worthwhile to adapt also the tests. Besides that everything works as it should... Thanks!! |
@maleadt , do I assume right that you will not release any new independent CUDAdrv.jl version, but just CUDA.jl instead? |
Yes, see https://discourse.julialang.org/t/psa-cuda-jl-replacing-cuarrays-jl-cudanative-jl-cudadrv-jl-cudaapi-jl-call-for-testing/40205, it should be a trivial upgrade. |
Thanks for the info. I will try CUDA.jl as soon a I get to it. |
@maleadt, I will do the PR, I hope you can then merge and tag it quickly as it is the last missing thing to conclude our update to CUDA.jl - thanks! |
The
srcPos
anddstPos
taken as arguments byunsafe_copy3d!
are modified as follows before being passed further to the underlying CUDA function:However,
srcPos.x
anddstPos.x
should be multiplied bysizeof(T)
in addition as showed my debugging.Here is a successful copy of a YZ plane with the unmodified version of CUDAdrv (I had to set
srcPos=((2-1)*sizeof(A[1])+1, 1, 1)
instead ofsrcPos=(2, 1, 1)
as the multiplication bysizeof(T)
is missing inunsafe_copy3d!
):Besides, the test for copying a x-z plane in
test/memory.jl
does not seem quite correct even though it does not fail. But, I am not sure to fully understand its intention.The text was updated successfully, but these errors were encountered: