When the sparse matvec path in trnsparse matures, cg and gmres should accept sparse A directly. Currently both treat A as dense (torch.Tensor) or as a callable matvec.
Scope
- Extend the A argument type to
Union[torch.Tensor, Callable, trnsparse.SparseMatrix] (or whatever the trnsparse sparse type is called at the time)
- Dispatch to
trnsparse.spmv for the matvec path
- Add sparse-A tests
Depends on
- trnsparse providing a stable public matvec API (cross-project)
When the sparse matvec path in
trnsparsematures,cgandgmresshould accept sparse A directly. Currently both treat A as dense (torch.Tensor) or as a callable matvec.Scope
Union[torch.Tensor, Callable, trnsparse.SparseMatrix](or whatever the trnsparse sparse type is called at the time)trnsparse.spmvfor the matvec pathDepends on