Commit 3081ecf
committed
[SYSTEMDS-3793] Fix transpose performance on ultra-sparse matrices
The multi-threaded implementation of ultra-sparse matrices has a couple
of shortcomings (e.g., count column nnz, block allocation, too late
fallback to single-threaded). On a large 85M x 85M graph with 90M
non-zeros the transpose did not finish in hours. In this patch we now
introduces a more sophisticated sparse row iterator (row and column
lower/bounds) in order to facilitate a simple and fast transpose
ultra sparse operation. However, this implementation was still much
slower than falling back to single-threaded operations and thus use
single-threaded transpose for all ultra-sparse matrices instead of
if nnz < max(rows,cols). Now this operations completes in <9s.1 parent b8b0c23 commit 3081ecf
File tree
3 files changed
+71
-18
lines changed- src/main/java/org/apache/sysds/runtime
- data
- matrix/data
3 files changed
+71
-18
lines changedLines changed: 38 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
564 | 580 | | |
565 | 581 | | |
566 | 582 | | |
| |||
694 | 710 | | |
695 | 711 | | |
696 | 712 | | |
697 | | - | |
| 713 | + | |
698 | 714 | | |
| 715 | + | |
| 716 | + | |
699 | 717 | | |
700 | 718 | | |
701 | 719 | | |
702 | 720 | | |
703 | | - | |
| 721 | + | |
704 | 722 | | |
705 | 723 | | |
706 | 724 | | |
707 | 725 | | |
708 | 726 | | |
709 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
710 | 736 | | |
711 | 737 | | |
712 | 738 | | |
| |||
717 | 743 | | |
718 | 744 | | |
719 | 745 | | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
| 746 | + | |
724 | 747 | | |
| 748 | + | |
725 | 749 | | |
726 | 750 | | |
727 | | - | |
| 751 | + | |
728 | 752 | | |
729 | 753 | | |
730 | 754 | | |
| |||
733 | 757 | | |
734 | 758 | | |
735 | 759 | | |
736 | | - | |
| 760 | + | |
737 | 761 | | |
738 | 762 | | |
739 | 763 | | |
740 | 764 | | |
741 | 765 | | |
742 | | - | |
743 | | - | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
744 | 769 | | |
745 | 770 | | |
746 | 771 | | |
747 | 772 | | |
748 | | - | |
| 773 | + | |
| 774 | + | |
749 | 775 | | |
750 | 776 | | |
751 | 777 | | |
| |||
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
| 237 | + | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
| |||
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
279 | | - | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
283 | | - | |
284 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
| |||
1192 | 1195 | | |
1193 | 1196 | | |
1194 | 1197 | | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1195 | 1207 | | |
1196 | 1208 | | |
1197 | 1209 | | |
| |||
3861 | 3873 | | |
3862 | 3874 | | |
3863 | 3875 | | |
| 3876 | + | |
| 3877 | + | |
3864 | 3878 | | |
3865 | 3879 | | |
3866 | 3880 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
689 | 702 | | |
690 | 703 | | |
691 | 704 | | |
| |||
0 commit comments