You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unify CPU/GPU code paths with rowptr_target/colval_target
Replace conditional GPU array checks with always-populated target arrays:
- For CPU: rowptr_target === rowptr, colval_target === colval (same objects)
- For GPU: rowptr_target/colval_target are GPU copies
This eliminates runtime conditionals in SpMV and other operations,
providing a single unified code path for both CPU and GPU backends.
Changes:
- Rename rowptr_gpu/colval_gpu to rowptr_target/colval_target
- Add _to_target_backend() helper function
- Update all SparseMatrixMPI constructor sites (~20 locations)
- Update SpMV to use target arrays directly without conditionals
- Update Metal extension mtl()/cpu() functions
0 commit comments