willow-ahrens / Finch.jl

Sparse tensors in Julia and more! Datastructure-driven array programing language.
http://willowahrens.io/Finch.jl/
MIT License
157 stars 15 forks source link

should we support fsprand(n, m, p) when n * m > typemax(Int)? #488

Closed mtsokol closed 4 months ago

mtsokol commented 5 months ago

Hi @willow-ahrens,

I'm working on benchmarks and for 1_000_000x1_000_000 I'm not able to move from COO format (that is returned by fsprand) to CSC:

using Finch

M = Tensor(Dense(SparseList(Element(0.0))), fsprand(1_000_000, 1_000_000, 1e-05));

where the last line runs infinitely.

willow-ahrens commented 4 months ago

Oops! We haven't always had the let programming construct, and it looks like there's some old code from those dark times that uses a scalar instead, resulting in a dense loop. I fixed it in a pr