I implemented triangle counting (SpA @ SpA * SpA), it runs for eager mode but decorating with @sparse.compiled to run lazy mode fails with:
ERROR: ArgumentError: Please supply initial value for reduction of Any with +.
Stacktrace:
[1] initial_value(op::Function, T::Type)
@ Finch ~/JuliaProjects/Finch.jl/src/interface/lazy.jl:114
[2] reduce(op::Function, arg::Finch.LazyTensor{Any, 2})
@ Finch ~/JuliaProjects/Finch.jl/src/interface/lazy.jl:127
[3] sum(arr::Finch.LazyTensor{Any, 2})
@ Finch ~/JuliaProjects/Finch.jl/src/interface/lazy.jl:74
[4] top-level scope
@ REPL[5]:1
Here's a code snippet to reproduce it:
using Finch
A = Tensor(Dense(Dense(Element(0.0))), 10, 10)
res = sum(tensordot(A, A, ((1,), (2,))))
A_lazy = Finch.LazyTensor(A)
res = sum(tensordot(A_lazy, A_lazy, ((1,), (2,)))) # fails
Hi @willow-ahrens,
I implemented triangle counting (
SpA @ SpA * SpA
), it runs for eager mode but decorating with@sparse.compiled
to run lazy mode fails with:Here's a code snippet to reproduce it: