Skip to content

Commit 6f2e783

Browse files
committed
Don't duplicate Adapt methods
1 parent d498a40 commit 6f2e783

2 files changed

Lines changed: 0 additions & 8 deletions

File tree

ext/StridedAMDGPUExt.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ using AMDGPU: GPUArrays
66

77
const ALL_FS = Union{typeof(adjoint), typeof(conj), typeof(identity), typeof(transpose)}
88

9-
function Adapt.adapt_storage(to::AMDGPU.Runtime.Adaptor, xs::StridedView{T,N,TA,F}) where {T,N,TA<:ROCArray{T},F <: ALL_FS}
10-
return StridedView(Adapt.adapt(to, parent(xs)), xs.size, xs.strides, xs.offset, xs.op)
11-
end
12-
139
function Base.copy!(dst::StridedView{TD, ND, TAD, FD}, src::StridedView{TS, NS, TAS, FS}) where {TD, ND, TAD <: ROCArray{TD}, FD <: ALL_FS, TS, NS, TAS <: ROCArray{TS}, FS <: ALL_FS}
1410
bc_style = Base.Broadcast.BroadcastStyle(TAS)
1511
bc = Base.Broadcast.Broadcasted(bc_style, identity, (src,), axes(dst))

ext/StridedCUDAExt.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ using CUDA: GPUArrays
66

77
const ALL_FS = Union{typeof(adjoint), typeof(conj), typeof(identity), typeof(transpose)}
88

9-
function Adapt.adapt_storage(to::KernelAdaptor, xs::StridedView{T,N,TA,F}) where {T,N,TA<:CuArray{T},F <: ALL_FS}
10-
return StridedView(Adapt.adapt(to, parent(xs)), xs.size, xs.strides, xs.offset, xs.op)
11-
end
12-
139
function Base.copy!(dst::StridedView{TD, ND, TAD, FD}, src::StridedView{TS, NS, TAS, FS}) where {TD, ND, TAD <: CuArray{TD}, FD <: ALL_FS, TS, NS, TAS <: CuArray{TS}, FS <: ALL_FS}
1410
bc_style = Base.Broadcast.BroadcastStyle(TAS)
1511
bc = Base.Broadcast.Broadcasted(bc_style, identity, (src,), axes(dst))

0 commit comments

Comments
 (0)