Closed mtsokol closed 1 month ago
with verbose mode:
:(function var"##compute#295"(prgm)
begin
V = (((((((((prgm.children[1]).children[2]).children[2]).children[3]).children[2]).children[1]).children[1]).children[1]).children[2]).tns.val::Tensor{DenseLevel{Int64, DenseLevel{Int64, ElementLevel{0.0, Float64, Int64, Vector{Float64}}}}}
V_2 = (((((((((prgm.children[1]).children[2]).children[2]).children[3]).children[3]).children[1]).children[1]).children[1]).children[2]).tns.val::Tensor{DenseLevel{Int64, DenseLevel{Int64, ElementLevel{0.0, Float64, Int64, Vector{Float64}}}}}
A0 = V::Tensor{DenseLevel{Int64, DenseLevel{Int64, ElementLevel{0.0, Float64, Int64, Vector{Float64}}}}}
A0_2 = Tensor(Dense(SparseDict(Element{0.0, Float64}())))::Tensor{DenseLevel{Int64, SparseLevel{Int64, Finch.DictTable{Int64, Int64, Vector{Int64}, Vector{Int64}, Vector{Int64}, Dict{Tuple{Int64, Int64}, Int64}}, ElementLevel{0.0, Float64, Int64, Vector{Float64}}}}}
@finch mode = :fast begin
A0_2 .= 0.0
for i1 = _
for i0 = _
A0_2[i1, i0] = A0[i0, i1]
end
end
return A0_2
end
A2 = V_2::Tensor{DenseLevel{Int64, DenseLevel{Int64, ElementLevel{0.0, Float64, Int64, Vector{Float64}}}}}
A2_2 = Tensor(Dense(SparseDict(Element{0.0, Float64}())))::Tensor{DenseLevel{Int64, SparseLevel{Int64, Finch.DictTable{Int64, Int64, Vector{Int64}, Vector{Int64}, Vector{Int64}, Dict{Tuple{Int64, Int64}, Int64}}, ElementLevel{0.0, Float64, Int64, Vector{Float64}}}}}
@finch mode = :fast begin
A2_2 .= 0.0
for i3 = _
for i2 = _
A2_2[i3, i2] = A2[i2, i3]
end
end
return A2_2
end
A4 = Tensor(Dense(SparseDict(Element{0.0, Float64}())))::Tensor{DenseLevel{Int64, SparseLevel{Int64, Finch.DictTable{Int64, Int64, Vector{Int64}, Vector{Int64}, Vector{Int64}, Dict{Tuple{Int64, Int64}, Int64}}, ElementLevel{0.0, Float64, Int64, Vector{Float64}}}}}
@finch mode = :fast begin
A4 .= 0.0
for i10 = _
for i7 = _
for i6 = _
A4[i6, i10] << + >>= (*)(A0_2[i6, i7], A2_2[i7, i10])
end
end
end
return A4
end
return (A4,)
end
end)
Finch has somehow managed to turn this into a sparse-sparse problem
it looks like two failures happened during autoscheduling:
@willow-ahrens,
Here I share performance issue that we found in
SDDMM
.tensordot
on row-major has a huge time overhead (I think there's a format change for row-major).Column-major example:
Row-major example: