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

Version 0.6 support: Problem with @simd macro #30

Closed
getzdan opened this issue May 27, 2017 · 3 comments
Closed

Version 0.6 support: Problem with @simd macro #30

getzdan opened this issue May 27, 2017 · 3 comments

Comments

@getzdan
Copy link
Contributor

getzdan commented May 27, 2017

When trying to run on 0.6, I get the following error:

julia> A = rand(4,4)
4×4 Array{Float64,2}:
 0.583756  0.913072  0.142562  0.409319 
...

julia> tensortrace(A,[1,1])
WARNING: Array{T}(::Type{T}, m::Int) is deprecated, use Array{T}(m) instead.
...
ERROR: MethodError: no method matching @simd(::LineNumberNode)
Closest candidates are:
  @simd(::LineNumberNode, ::ANY) at simdloop.jl:89
Stacktrace:
 [1] @generated body at /home/dan/.julia/v0.7/TensorOperations/src/implementation/recursive.jl:29 [inlined]
 [2] trace_rec!(::TensorOperations.One, ::TensorOperations.StridedData{1,Float64,:N}, ::TensorOperations.Zero, ::TensorOperations.StridedData{1,Float64,:N}, ::Tuple{Int64}, ::Int64, ::Int64, ::Tuple{Int64}) at /home/dan/.julia/v0.7/TensorOperations/src/implementation/recursive.jl:27
 [3] trace!(::Int64, ::Array{Float64,2}, ::Type{Val{:N}}, ::Int64, ::Array{Float64,0}, ::Array{Int64,1}, ::Array{Int64,1}, ::Array{Int64,1}) at /home/dan/.julia/v0.7/TensorOperations/src/implementation/stridedarray.jl:63
 [4] tensortrace(::Array{Float64,2}, ::Array{Int64,1}, ::Array{Int64,1}) at /home/dan/.julia/v0.7/TensorOperations/src/functions/simple.jl:54
 [5] tensortrace(::Array{Float64,2}, ::Array{Int64,1}) at /home/dan/.julia/v0.7/TensorOperations/src/functions/simple.jl:51

When the @simd code is taken out of _stridedloops in meta.jl, things work again. The culprit seems to be a LineNumber nodes which enter the expression.

@getzdan
Copy link
Contributor Author

getzdan commented May 27, 2017

Oops... forgot to switch to master first. Closing.

@getzdan getzdan closed this as completed May 27, 2017
@getzdan
Copy link
Contributor Author

getzdan commented May 27, 2017

Still a problem on master.

@getzdan getzdan reopened this May 27, 2017
getzdan added a commit to getzdan/TensorOperations.jl that referenced this issue May 27, 2017
This is a quick fixup which was tested on latest 0.6 and master. Before merging tests on other versions are appropriate.
@getzdan
Copy link
Contributor Author

getzdan commented May 27, 2017

Further discussion in the pull request #31 (which solves this problem, at least temporarily for me).

@getzdan getzdan closed this as completed May 27, 2017
Jutho added a commit that referenced this issue Jul 6, 2017
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

No branches or pull requests

1 participant