Skip to content

Commit e9dfd5b

Browse files
authored
Fix definition of Buffer methods in GPU pkgextensions (#947)
1 parent 0a29d05 commit e9dfd5b

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MPI"
22
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
33
authors = []
4-
version = "0.20.25"
4+
version = "0.20.26"
55

66
[deps]
77
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"

ext/AMDGPUExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module AMDGPUExt
22

33
using AMDGPU: AMDGPU
4-
using MPI: MPIPtr, Buffer, Datatype
4+
using MPI: MPI, MPIPtr, Buffer, Datatype
55

66
function Base.cconvert(::Type{MPIPtr}, A::AMDGPU.ROCArray{T}) where T
77
A
@@ -19,7 +19,7 @@ function Base.unsafe_convert(::Type{MPIPtr}, V::SubArray{T,N,P,I,true}) where {T
1919
return reinterpret(MPIPtr, pV)
2020
end
2121

22-
function Buffer(arr::AMDGPU.ROCArray)
22+
function MPI.Buffer(arr::AMDGPU.ROCArray)
2323
Buffer(arr, Cint(length(arr)), Datatype(eltype(arr)))
2424
end
2525

ext/CUDAExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module CUDAExt
22

33
using CUDA: CUDA
4-
using MPI: MPIPtr, Buffer, Datatype
4+
using MPI: MPI, MPIPtr, Buffer, Datatype
55

66
function Base.cconvert(::Type{MPIPtr}, buf::CUDA.CuArray{T}) where T
77
Base.cconvert(CUDA.CuPtr{T}, buf) # returns DeviceBuffer
@@ -19,7 +19,7 @@ function Base.unsafe_convert(::Type{MPIPtr}, V::SubArray{T,N,P,I,true}) where {T
1919
return reinterpret(MPIPtr, pV)
2020
end
2121

22-
function Buffer(arr::CUDA.CuArray)
22+
function MPI.Buffer(arr::CUDA.CuArray)
2323
Buffer(arr, Cint(length(arr)), Datatype(eltype(arr)))
2424
end
2525

0 commit comments

Comments
 (0)