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

StridedView type piracy #27

Closed
cossio opened this issue Apr 12, 2022 · 0 comments · Fixed by #28
Closed

StridedView type piracy #27

cossio opened this issue Apr 12, 2022 · 0 comments · Fixed by #28

Comments

@cossio
Copy link
Contributor

cossio commented Apr 12, 2022

The following line:

Strided.StridedView(x::PermutedDimsArray{T,N,perm}) where {T,N,perm} = permutedims(StridedView(x.parent), perm)

is type piracy.

It's also not necessary, since this method was recently added in Strided.jl:

https://github.com/Jutho/Strided.jl/blob/10cc9872f5b994d5f906c0ef0f28cef77ddd2683/src/stridedview.jl#L35

As a result, loading this package results in a warning:

WARNING: Method definition (::Type{Strided.StridedView{T, N, A, F} where F<:Union{typeof(Base.adjoint), typeof(Base.conj), typeof(Base.identity), typeof(Base.transpose)} where A<:(DenseArray{T, N} where N where T) where N where T})(Base.PermutedDimsArrays.PermutedDimsArray{T, N, perm, iperm, AA} where AA<:(AbstractArray{T, N} where N where T) where iperm) where {T, N, perm} in module Strided at /home/cossio/.julia/packages/Strided/LvYNZ/src/stridedview.jl:35 overwritten in module Torch at /home/cossio/.julia/packages/Pickle/iHRCQ/src/torch/torch_save.jl:37.

Can we remove this line?

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.

1 participant