We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DimensionMismatch
Hi there, a recent patch (v4.0.2 -> v4.0.3) seems to introduce an issue. Here is a minimal working example:
v4.0.2
v4.0.3
# 5 x 6 A = [ 3.0 2.0 5.0 2.0 4.0 3.0; 1.0 5.0 3.0 3.0 8.0 4.0; 5.0 1.0 1.0 2.0 3.0 3.0; 7.0 1.0 3.0 3.0 1.0 1.0; 8.0 1.0 4.0 1.0 1.0 8.0 ] # 3 x 4 B = [ 2.0 2.0 1.0 4.0; 3.0 2.0 3.0 3.0; 3.0 3.0 3.0 1.0 ] # 6 x 4 X = [ 2.0 3.0 3.0 5.0; 1.0 2.0 1.0 2.0; 5.0 5.0 4.0 2.0; 1.0 2.0 3.0 7.0; 7.0 9.0 1.0 1.0; 6.0 7.0 3.0 2.0 ] E = zeros(5,3) @tensor begin E[i_1, i_2] = X[j_1, j_2] * A[i_1, j_1] * B[i_2, j_2] end
Output:
TensorOperations@v4.0.2 ======================= 5×3 Matrix{Float64}: 622.0 750.0 743.0 759.0 904.0 922.0 508.0 589.0 559.0 527.0 600.0 526.0 777.0 934.0 899.0 TensorOperations@v4.0.3 ======================= ERROR: DimensionMismatch: Stacktrace: [1] _threaded_blas_mul!(C::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, A::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, B::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, α::VectorInterface.One, β::VectorInterface.Zero, nthreads::Int64) @ Strided ~/.julia/packages/Strided/l1vm3/src/linalg.jl:101 [2] _mul! @ ~/.julia/packages/Strided/l1vm3/src/linalg.jl:91 [inlined] [3] mul!(C::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, A::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, B::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, α::VectorInterface.One, β::VectorInterface.Zero) @ Strided ~/.julia/packages/Strided/l1vm3/src/linalg.jl:60 [4] tensorcontract!(C::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, pC::Tuple{Tuple{Int64}, Tuple{Int64}}, A::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, pA::Tuple{Tuple{Int64}, Tuple{Int64}}, conjA::Symbol, B::StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}, pB::Tuple{Tuple{Int64}, Tuple{Int64}}, conjB::Symbol, α::VectorInterface.One, β::VectorInterface.Zero, backend::TensorOperations.Backend{:StridedBLAS}) @ TensorOperations ~/.julia/packages/TensorOperations/19xy5/src/implementation/strided.jl:90 [5] tensorcontract!(C::Matrix{Float64}, pC::Tuple{Tuple{Int64}, Tuple{Int64}}, A::Matrix{Float64}, pA::Tuple{Tuple{Int64}, Tuple{Int64}}, conjA::Symbol, B::Matrix{Float64}, pB::Tuple{Tuple{Int64}, Tuple{Int64}}, conjB::Symbol, α::VectorInterface.One, β::VectorInterface.Zero, #unused#::TensorOperations.Backend{:StridedBLAS}) @ TensorOperations ~/.julia/packages/TensorOperations/19xy5/src/implementation/abstractarray.jl:63 [6] tensorcontract!(C::Matrix{Float64}, pC::Tuple{Tuple{Int64}, Tuple{Int64}}, A::Matrix{Float64}, pA::Tuple{Tuple{Int64}, Tuple{Int64}}, conjA::Symbol, B::Matrix{Float64}, pB::Tuple{Tuple{Int64}, Tuple{Int64}}, conjB::Symbol, α::VectorInterface.One, β::VectorInterface.Zero) @ TensorOperations ~/.julia/packages/TensorOperations/19xy5/src/implementation/abstractarray.jl:35 [7] top-level scope @ REPL[7]:1
The text was updated successfully, but these errors were encountered:
Thanks for the report; seems to be a bug in the underlying Strided implementation (which was also updated). We will try to fix asap.
Sorry, something went wrong.
On second thought, it still is probably in TensorOperations, just before being lowered into Strided. Anyway, a fix will be on its way soon.
important bug fix
c609c85
This has been fixed in v4.0.4, so I am closing this issue
No branches or pull requests
Hi there,
a recent patch (
v4.0.2
->v4.0.3
) seems to introduce an issue. Here is a minimal working example:Output:
The text was updated successfully, but these errors were encountered: