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

upgrade dependencies #9

Merged
merged 3 commits into from
May 20, 2021
Merged

upgrade dependencies #9

merged 3 commits into from
May 20, 2021

Conversation

GiggleLiu
Copy link
Member

@GiggleLiu GiggleLiu commented May 17, 2021

@chriselrod I update the dependencies. However, there are some strange errors when computing

matmul(::Transpose{TropicalF32, ...}, ::Matrix{TropicalF32})

The error message is:

matmul: Error During Test at /home/leo/.julia/dev/TropicalGEMM/test/gemm.jl:18
  Test threw exception
  Expression: isapprox(distance(f(a, b), naive_mul!(similar(a), a, b)), 0; atol = atol)
  KeyError: key TropicalF32 not found
  Stacktrace:
    [1] getindex
      @ ./iddict.jl:93 [inlined]
    [2] shuffle_load_quote(#unused#::Type{TropicalF32}, integer_params::NTuple{9, Int64}, #unused#::Type{StaticInt{0}}, align::Bool, rs::Int64, MASKFLAG::UInt64)
      @ VectorizationBase ~/.julia/packages/VectorizationBase/FKaMR/src/vecunroll/memory.jl:89
    [3] #s157#317
      @ ~/.julia/packages/VectorizationBase/FKaMR/src/vecunroll/memory.jl:374 [inlined]
    [4] var"#s157#317"(A::Any, AU::Any, F::Any, N::Any, AV::Any, W::Any, M::Any, I::Any, T::Any, D::Any, RS::Any, UX::Any, X::Any, C::Any, B::Any, ::Any, sptr::Any, u::Any, sm::Any, #unused#::Type, #unused#::Type, #unused#::Any)
      @ VectorizationBase ./none:0
    [5] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any, N} where N)
      @ Core ./boot.jl:571
    [6] _vload
      @ ~/.julia/packages/VectorizationBase/FKaMR/src/vecunroll/memory.jl:419 [inlined]
    [7] macro expansion
      @ ~/.julia/packages/LoopVectorization/VCKTK/src/reconstruct_loopset.jl:683 [inlined]
    [8] _avx_!(::Val{(false, 0, 0, false, 8, 32, 15, 64, 32768, 262144, 12582912, 0x0000000000000001)}, ::Val{(:numericconstant, Symbol("###zero###11###"), LoopVectorization.OperationStruct(0x0000000000000012, 0x0000000000000000, 0x0000000000000003,  ... ::Int64, ::Ptr{TropicalF32}, ::Ptr{TropicalF32}, ::Ptr{TropicalF32}, ::Int64, ::Int64, ::Int64)
      @ LoopVectorization ~/.julia/packages/LoopVectorization/VCKTK/src/reconstruct_loopset.jl:683
    [9] loopmul!
      @ ~/.julia/dev/Octavian/src/macrokernels.jl:83 [inlined]
   [10] _matmul!
      @ ~/.julia/dev/Octavian/src/matmul.jl:273 [inlined]
   [11] matmul(A::LinearAlgebra.Transpose{TropicalF32, Matrix{TropicalF32}}, B::Matrix{TropicalF32})
      @ Octavian ~/.julia/dev/Octavian/src/matmul.jl:209
   [12] macro expansion
      @ ~/.julia/dev/TropicalGEMM/test/gemm.jl:54 [inlined]
   [13] macro expansion
      @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
   [14] top-level scope
      @ ~/.julia/dev/TropicalGEMM/test/gemm.jl:39

I do not have any specialization for Float32 types. Do you have any clue on this error?

@GiggleLiu GiggleLiu changed the title upgrade Octavian upgrade dependencies May 17, 2021
@GiggleLiu
Copy link
Member Author

This is a minimum working example.

julia> using TropicalGEMM

julia> a = Tropical.(randn(10, 10)); b = copy(a);

julia> transpose(a) * b
ERROR: KeyError: key TropicalF64 not found
Stacktrace:
  [1] getindex
    @ ./iddict.jl:93 [inlined]
  [2] shuffle_load_quote(#unused#::Type{TropicalF64}, integer_params::NTuple{9, Int64}, #unused#::Type{Static.StaticInt{0}}, align::Bool, rs::Int64, MASKFLAG::UInt64)
    @ VectorizationBase ~/.julia/packages/VectorizationBase/rpkMv/src/vecunroll/memory.jl:90
  [3] #s156#317
    @ ~/.julia/packages/VectorizationBase/rpkMv/src/vecunroll/memory.jl:375 [inlined]
  [4] var"#s156#317"(A::Any, AU::Any, F::Any, N::Any, AV::Any, W::Any, M::Any, I::Any, T::Any, D::Any, RS::Any, UX::Any, X::Any, C::Any, B::Any, ::Any, sptr::Any, u::Any, sm::Any, #unused#::Type, #unused#::Type, #unused#::Any)
    @ VectorizationBase ./none:0
  [5] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any, N} where N)
    @ Core ./boot.jl:571
  [6] _vload
    @ ~/.julia/packages/VectorizationBase/rpkMv/src/vecunroll/memory.jl:420 [inlined]
  [7] macro expansion
    @ ~/.julia/packages/LoopVectorization/yPiaG/src/reconstruct_loopset.jl:671 [inlined]
  [8] _avx_!(::Val{(false, 0, 0, false, 4, 32, 15, 64, 32768, 262144, 12582912, 0x0000000000000001)}, ::Val{(:numericconstant, Symbol("###zero###11###"), LoopVectorization.OperationStruct(0x0000000000000012, 0x0000000000000000, 0x0000000000000003, 0x0000000000000000, LoopVectorization.constant, 0x00, 0x01), :LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x0000000000000023, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, LoopVectorization.memload, 0x01, 0x02), :LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x0000000000000031, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, LoopVectorization.memload, 0x02, 0x03), :LoopVectorization, :vfmadd_fast, LoopVectorization.OperationStruct(0x0000000000000231, 0x0000000000000003, 0x0000000000000000, 0x0000000000020301, LoopVectorization.compute, 0x00, 0x01), :LoopVectorization, :identity, LoopVectorization.OperationStruct(0x0000000000000012, 0x0000000000000003, 0x0000000000000000, 0x0000000000000004, LoopVectorization.compute, 0x00, 0x01), :LoopVectorization, :LOOPCONSTANTINSTRUCTION, LoopVectorization.OperationStruct(0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, LoopVectorization.constant, 0x00, 0x04), :LoopVectorization, :LOOPCONSTANTINSTRUCTION, LoopVectorization.OperationStruct(0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, LoopVectorization.constant, 0x00, 0x05), :LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x0000000000000021, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, LoopVectorization.memload, 0x03, 0x06), :LoopVectorization, :mul_fast, LoopVectorization.OperationStruct(0x0000000000000021, 0x0000000000000000, 0x0000000000000000, 0x0000000000000708, LoopVectorization.compute, 0x00, 0x07), :LoopVectorization, :vfmadd_fast, LoopVectorization.OperationStruct(0x0000000000000012, 0x0000000000000003, 0x0000000000000000, 0x0000000000060509, LoopVectorization.compute, 0x00, 0x06), :LoopVectorization, :setindex!, LoopVectorization.OperationStruct(0x0000000000000021, 0x0000000000000003, 0x0000000000000000, 0x000000000000000a, LoopVectorization.memstore, 0x03, 0x08))}, ::Val{(LoopVectorization.ArrayRefStruct{:A, Symbol("##vptr##_A")}(0x0000000000000101, 0x0000000000000203, 0x0000000000000000, 0x0000000000000101), LoopVectorization.ArrayRefStruct{:B, Symbol("##vptr##_B")}(0x0000000000000101, 0x0000000000000301, 0x0000000000000000, 0x0000000000000101), LoopVectorization.ArrayRefStruct{:C, Symbol("##vptr##_C")}(0x0000000000000101, 0x0000000000000201, 0x0000000000000000, 0x0000000000000101))}, ::Val{(0, (), (6, 7), (), (), ((1, LoopVectorization.IntOrFloat),), ())}, ::Val{(:n, :m, :k)}, ::Val{Tuple{Tuple{StrideArraysCore.CloseOpen{Static.StaticInt{0}, Int64}, StrideArraysCore.CloseOpen{Static.StaticInt{0}, Int64}, StrideArraysCore.CloseOpen{Static.StaticInt{0}, Int64}}, Tuple{VectorizationBase.GroupedStridedPointers{Tuple{Ptr{TropicalF64}, Ptr{TropicalF64}, Ptr{TropicalF64}}, (2, 1, 1), (0, 0, 0), ((2, 1), (1, 2), (1, 2)), ((1, 2), (3, 4), (5, 6)), Tuple{Int64, Static.StaticInt{8}, Static.StaticInt{8}, Int64, Static.StaticInt{8}, Int64}, NTuple{6, Static.StaticInt{0}}}, TropicalF64, TropicalF64}}}, ::Int64, ::Int64, ::Int64, ::Ptr{TropicalF64}, ::Ptr{TropicalF64}, ::Ptr{TropicalF64}, ::Int64, ::Int64, ::Int64, ::Float64, ::Float64)
    @ LoopVectorization ~/.julia/packages/LoopVectorization/yPiaG/src/reconstruct_loopset.jl:671
  [9] loopmul!
    @ ~/.julia/packages/Octavian/yOhDw/src/macrokernels.jl:83 [inlined]
 [10] _matmul!
    @ ~/.julia/packages/Octavian/yOhDw/src/matmul.jl:273 [inlined]
 [11] matmul!
    @ ~/.julia/packages/Octavian/yOhDw/src/matmul.jl:236 [inlined]
 [12] matmul!
    @ ~/.julia/packages/Octavian/yOhDw/src/matmul.jl:226 [inlined]
 [13] mul!(o::Matrix{TropicalF64}, a::LinearAlgebra.Transpose{TropicalF64, Matrix{TropicalF64}}, b::Matrix{TropicalF64}, α::Bool, β::Bool)
    @ TropicalGEMM ~/.julia/dev/TropicalGEMM/src/gemm.jl:158
 [14] mul!
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/matmul.jl:275 [inlined]
 [15] *(A::LinearAlgebra.Transpose{TropicalF64, Matrix{TropicalF64}}, B::Matrix{TropicalF64})
    @ LinearAlgebra /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/matmul.jl:153
 [16] top-level scope
    @ REPL[3]:1

@chriselrod
Copy link
Collaborator

Try adding mask versions of this.

@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #9 (aabcd78) into master (7dfc873) will increase coverage by 1.88%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   86.11%   88.00%   +1.88%     
==========================================
  Files           3        2       -1     
  Lines          72       75       +3     
==========================================
+ Hits           62       66       +4     
+ Misses         10        9       -1     
Impacted Files Coverage Δ
src/fallbacks.jl 91.30% <100.00%> (ø)
src/gemm.jl 86.53% <100.00%> (+3.20%) ⬆️
src/TropicalGEMM.jl

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29163c8...aabcd78. Read the comment docs.

@GiggleLiu
Copy link
Member Author

Thanks, it solved the problem. 🎉

@GiggleLiu GiggleLiu merged commit d1c52f0 into master May 20, 2021
@chriselrod chriselrod deleted the upgrade-octavian branch May 26, 2021 14:31
This pull request was closed.
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 this pull request may close these issues.

2 participants