JuliaLinearAlgebra / Octavian.jl

Multi-threaded BLAS-like library that provides pure Julia matrix multiplication
https://julialinearalgebra.github.io/Octavian.jl/stable/
Other
226 stars 18 forks source link

Broken because of new version Static@0.7.8? #159

Closed Song921012 closed 1 year ago

Song921012 commented 1 year ago

Hello, it seems that Octavian is not compatible with new version Static@0.7.8. I am not sure.

julia> versioninfo()
Julia Version 1.8.2
Commit 36034abf260 (2022-09-29 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i5-9300HF CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 6 on 8 virtual cores
Environment:
  JULIA_NUM_THREADS = 6
  LD_LIBRARY_PATH = /usr/lib/cuda/lib64:/opt/copt50/lib:/usr/local/lib64:/opt/openrobots/lib:/home/aidishage/myenv/lib
  JULIA_PARDISO = /home/aidishage/myenv/lib
  JULIA_PYTHONCALL_EXE = @PyCall
  JULIA_CONDAPKG_BACKEND = Null

For test environment ] activate --temp and ] add Octavian.

julia> using Octavian
[ Info: Precompiling Octavian [6fd5a793-0b7e-452c-907f-f8bfe9c57db4]
ERROR: LoadError: MethodError: no method matching dontpack(::LayoutPointers.StridedPointer{Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}}}, ::Int64, ::Int64, ::Int64, ::Int64, ::Type{Float64}, ::Int64)
Closest candidates are:
  dontpack(::LayoutPointers.AbstractStridedPointer{Ta, N} where N, ::Any, ::Any, ::Static.StaticInt{mc}, ::Static.StaticInt{kc}, ::Type{Tc}, ::Any) where {mc, kc, Tc, Ta} at ~/.julia/packages/Octavian/ZURFp/src/matmul.jl:274
  dontpack(::LayoutPointers.AbstractStridedPointer{Ta, N} where N, ::Any, ::Any, ::Static.StaticInt{mc}, ::Static.StaticInt{kc}, ::Type{Tc}) where {mc, kc, Tc, Ta} at ~/.julia/packages/Octavian/ZURFp/src/matmul.jl:87
Stacktrace:
 [1] __matmul!(C::LayoutPointers.StridedPointer{Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}}}, A::LayoutPointers.StridedPointer{Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}}}, B::LayoutPointers.StridedPointer{Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}}}, α::Static.StaticInt{1}, β::Static.StaticInt{0}, M::Int64, K::Int64, N::Int64, nthread::Nothing)
   @ Octavian ~/.julia/packages/Octavian/ZURFp/src/matmul.jl:396
 [2] _matmul!
   @ ~/.julia/packages/Octavian/ZURFp/src/matmul.jl:305 [inlined]
 [3] matmul!
   @ ~/.julia/packages/Octavian/ZURFp/src/matmul.jl:270 [inlined]
 [4] matmul
   @ ~/.julia/packages/Octavian/ZURFp/src/matmul.jl:237 [inlined]
 [5] matmul(A::Matrix{Float64}, B::Matrix{Float64})
   @ Octavian ~/.julia/packages/Octavian/ZURFp/src/matmul.jl:240
 [6] top-level scope
   @ ~/.julia/packages/Octavian/ZURFp/src/Octavian.jl:49
 [7] include
   @ ./Base.jl:419 [inlined]
 [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
   @ Base ./loading.jl:1554
 [9] top-level scope
   @ stdin:1
in expression starting at /home/aidishage/.julia/packages/Octavian/ZURFp/src/Octavian.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile Octavian [6fd5a793-0b7e-452c-907f-f8bfe9c57db4] to /home/aidishage/.julia/compiled/v1.8/Octavian/jl_ZAp3vY.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base ./loading.jl:1707
 [3] compilecache
   @ ./loading.jl:1651 [inlined]
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1337
 [5] _require_prelocked(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1200
 [6] macro expansion
   @ ./loading.jl:1180 [inlined]
 [7] macro expansion
   @ ./lock.jl:223 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1144
chriselrod commented 1 year ago

Hmm, yes, Static seems to prefer returning Int now?

chriselrod commented 1 year ago

@tokazama in case you weren't aware, but it should be fixed by #160.

Tokazama commented 1 year ago

Sorry about this. Was supposed to be a small change that helped out some people on subtyping for just StaticFloat64.