finch-tensor / Finch.jl

Sparse and Structured Tensor Compiler
http://willowahrens.io/Finch.jl/
MIT License
161 stars 16 forks source link

Extensible Load Balancing #607

Open willow-ahrens opened 4 months ago

willow-ahrens commented 4 months ago

It would be great if we could support more configurable load balancing in Finch. Currently, we only statically partition.

  1. Add an interface to CPUDevice that selects between :dynamic and :static strategies to @threads. https://github.com/willow-ahrens/Finch.jl/blob/a7f5b899d49051167aebd7568a65c2840ea6db69/src/architecture.jl#L35 https://github.com/willow-ahrens/Finch.jl/blob/a7f5b899d49051167aebd7568a65c2840ea6db69/src/lower.jl#L317
  2. Generalize the parallelism model to configure chunk size and overpartition loop iterations. https://github.com/willow-ahrens/Finch.jl/blob/a7f5b899d49051167aebd7568a65c2840ea6db69/src/lower.jl#L292