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

Synchronization in REPL #500

Closed
michel2323 opened this issue Sep 22, 2023 · 2 comments · Fixed by #501
Closed

Synchronization in REPL #500

michel2323 opened this issue Sep 22, 2023 · 2 comments · Fixed by #501

Comments

@michel2323
Copy link
Contributor

michel2323 commented Sep 22, 2023

On Julia 1.9.3 with the latest master with system ROCm 5.4 the result of a .+ b is not synchronized in the REPL.

julia> using AMDGPU

julia> a = ROCVector(ones(2))
2-element ROCArray{Float64, 1, AMDGPU.Runtime.Mem.HIPBuffer}:
 1.0
 1.0

julia> b = ROCVector(ones(2))
2-element ROCArray{Float64, 1, AMDGPU.Runtime.Mem.HIPBuffer}:
 1.0
 1.0

julia> a .+ b
2-element ROCArray{Float64, 1, AMDGPU.Runtime.Mem.HIPBuffer}:
 -1.8325506472120096e-6
 -1.8325506472120096e-6

julia> @show a .+ b
a .+ b = [2.0, 2.0]
2-element ROCArray{Float64, 1, AMDGPU.Runtime.Mem.HIPBuffer}:
 2.0
 2.0
@luraess
Copy link
Contributor

luraess commented Sep 23, 2023

That may occur since the REPL may print after the kernel launch returned while computations were not finalised. One would need sync afterwards. This behaviour was already observed with earlier versions of Julia and AMDGPU.

@pxl-th
Copy link
Member

pxl-th commented Sep 23, 2023

#501 will fix this.

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 a pull request may close this issue.

3 participants