Skip to content

Commit

Permalink
Fix ROCm-aware MPI extension (#763)
Browse files Browse the repository at this point in the history
* Fix conversion to Ptr
  • Loading branch information
utkinis authored Sep 5, 2023
1 parent 786ef51 commit c1794e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MPI"
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
authors = []
version = "0.20.14"
version = "0.20.15"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand All @@ -19,7 +19,7 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"

[compat]
AMDGPU = "0.3, 0.4, 0.5"
AMDGPU = "0.5.7"
CUDA = "3, 4"
DocStringExtensions = "0.8, 0.9"
MPIPreferences = "0.1.8"
Expand Down
2 changes: 1 addition & 1 deletion ext/AMDGPUExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function Base.cconvert(::Type{MPIPtr}, A::AMDGPU.ROCArray{T}) where T
end

function Base.unsafe_convert(::Type{MPIPtr}, X::AMDGPU.ROCArray{T}) where T
reinterpret(MPIPtr, Base.unsafe_convert(Ptr{T}, X.buf.ptr+X.offset))
reinterpret(MPIPtr, Base.unsafe_convert(Ptr{T}, X))
end

# only need to define this for strided arrays: all others can be handled by generic machinery
Expand Down

2 comments on commit c1794e9

@simonbyrne
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/90895

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.20.15 -m "<description of version>" c1794e9b241bd951260330c0d64d3fc19af2560e
git push origin v0.20.15

Please sign in to comment.