From what I can tell, the sparse byte map level zeros out when you use the follow protocol producing incorrect results.
using Finch
n = 100
data = fsprand(Int, n, n, .01)
A_sbm = Tensor(SparseByteMap(SparseByteMap(Element(0))), data)
A_d = Tensor(Dense(Dense(Element(0))), data)
C1 = Scalar(0)
C2 = Scalar(0)
@finch begin
C1 .= 0
for i=_
for j=_
for k=_
C1[] += A_sbm[follow(j),i] * A_sbm[k,j]
end
end
end
C2 .= 0
for i=_
for j=_
for k=_
C2[] += A_d[j,i] * A_d[k,j]
end
end
end
end
println(C1)
println(C2)
From what I can tell, the sparse byte map level zeros out when you use the follow protocol producing incorrect results.