Skip to content

Commit

Permalink
add baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibylau committed Jan 5, 2024
1 parent 9538bec commit ebb839e
Show file tree
Hide file tree
Showing 78 changed files with 2,850 additions and 10 deletions.
1 change: 1 addition & 0 deletions Baseline/taco
Submodule taco added at e74ab8
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,38 @@ This artifact supports evaluation claims in the paper #18 of OOPSLA'24 round 1:
1. The format conversion and compute kernels generated by UniSparse achieve performance that matches prior MLIR SparseTensor and TACO compilers, while provides a broader coverage for handling a wider range of custom formats. (Section 7.3 and 7.4)
2. The adoption of custom formats enabled by UniSparse leads to improved performance for common sparse linear algebra kernels on hardware platforms such as an Intel multi-core CPU, an NVIDIA GPU and a simulated PIM device. (Section 7.2)

In the Step-by-Step Instructions section below, we provide instructions on how to generate performance numbers in Section 7.2, 7.3 and 7.4 of the paper that support the claims above.
In the Step-by-Step Instructions section below, we provide instructions for 4 experiments. Experiment 1 and 2 reproduces the performance numbers in Section 7.3 and 7.4 respectively, which support the claim 1. Experiment 3 reproduces the performance numbers in Section 7.2.1, which supports claim 2. Experiment 4 reproduces the performance numbers in Section 7.2.2, which also supports claim 2. Experiment 4 is optional depending on whether the evaluator has an NVIDIA GPU and CUDA version >= 11.0. We use 4 datasets for each experiment, as more datasets make the docker image big and slow down the set up time.

## Hardware Dependencies
1. To support claim 1 and run experiments in Section 7.3 and 7.4, an Intel CPU will work;
2. To support claim 2 and run experiments in Section 7.2, our original experiments use a 48-core Intel Xeon Gold 6248R CPU at 3.00GHz and an NVIDIA RTX A6000 GPU. But to support claim 2, we believe a multi-core Intel CPU and an NVIDIA GPU will work.
1. To run experiments 1 and 2, an Intel CPU will work;
2. To run experiment 3, our original experiment uses a 48-core Intel Xeon Gold 6248R CPU at 3.00GHz, while we belive a multi-core Intel CPU should work;
3. To run experiment 4, our original experiment uses an NVIDIA RTX A6000 GPU, while we believe an NVIDIA GPU in general will work.

## Getting Started
### For Experiments 1, 2, 3
We first pull a docker image from dockerhub:
`docker login -u <your-dockerhub-username>`
`docker pull sibylau/mlir-llvm:omp`
It may take ~5mins to download the docker image.
Then we run a container from this docker image:
`docker run --rm -it --entrypoint bash <image-name-or-id>`
git clone zenodo UniSparse
source the bash file under the UniSparse project directory path:
`$cd UniSparse && source script/build.sh`

### For Experiment 4
We do not use the docker image. Please directly clone the zenedo repo:


## Step-by-Step Instructions
### Experiment 1


### Experiment 2

### Experiment 3

### Experiment 4

## Reusability Guide

Expand Down
Binary file added evaluation/FormatConversion/coo_to_c2sr
Binary file not shown.
Binary file added evaluation/FormatConversion/coo_to_cisr
Binary file not shown.
Binary file added evaluation/FormatConversion/coo_to_dia_4
Binary file not shown.
Binary file added evaluation/FormatConversion/csr_csc.o
Binary file not shown.
Binary file added evaluation/FormatConversion/dcsc_to_bcsr
Binary file not shown.
Binary file added evaluation/FormatConversion/dia1_to_csb
Binary file not shown.
Binary file added evaluation/FormatConversion/fused_csr_csc
Binary file not shown.
300 changes: 300 additions & 0 deletions evaluation/FormatConversion/results/coo_to_cisr.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
roadNet-PA_row_major.mtx
Size of the matrix: 1090920 1090920 1541898

Read from file done, time = 0.729361(s)

Sum done, time = 0.003378(s)

Schedule done, time = 0.057282(s)

Move done, time = 0.040737(s)

Fuse done, time = 0.006423(s)

Fuse done, time = 0.013886(s)
0.121751
wikipedia-20051105_row_major.mtx
Size of the matrix: 1634989 1634989 19753078

Read from file done, time = 7.67207(s)

Sum done, time = 0.02387(s)

Schedule done, time = 0.204234(s)

Move done, time = 0.613762(s)

Fuse done, time = 0.084371(s)

Fuse done, time = 0.101071(s)
1.02738
mouse_gene_45K_29M_csr_float32_row_major.mtx
Size of the matrix: 45101 45101 14506195

Read from file done, time = 4.66598(s)

Sum done, time = 0.02053(s)

Schedule done, time = 0.078583(s)

Move done, time = 0.271226(s)

Fuse done, time = 0.060781(s)

Fuse done, time = 0.064089(s)
0.495284
gplus_108K_13M_csr_float32_row_major.mtx
Size of the matrix: 107614 107614 13673453

Read from file done, time = 4.46023(s)

Sum done, time = 0.019199(s)

Schedule done, time = 0.078054(s)

Move done, time = 0.259289(s)

Fuse done, time = 0.059894(s)

Fuse done, time = 0.061876(s)
0.478395
pokec_1633K_31M_csr_float32_row_major.mtx
Size of the matrix: 1632803 1632803 30622564

Read from file done, time = 10.6273(s)

Sum done, time = 0.036899(s)

Schedule done, time = 0.267732(s)

Move done, time = 0.9401(s)

Fuse done, time = 0.128151(s)

Fuse done, time = 0.15218(s)
1.52518
hollywood_1M_113M_row_major.mtx
Size of the matrix: 1069126 1069126 112613306

Read from file done, time = 42.26(s)

Sum done, time = 0.153701(s)

Schedule done, time = 0.651654(s)

Move done, time = 2.328(s)

Fuse done, time = 0.474178(s)

Fuse done, time = 0.52635(s)
4.13403
ogbl_ppa_576K_42M_csr_float32_row_major.mtx
Size of the matrix: 576289 576289 42463861

Read from file done, time = 14.5706(s)

Sum done, time = 0.056255(s)

Schedule done, time = 0.261021(s)

Move done, time = 0.977207(s)

Fuse done, time = 0.180187(s)

Fuse done, time = 0.206182(s)
1.68093
live_journal_5M_69M_csr_float32_row_major.mtx
Size of the matrix: 4847571 4847571 68475391

Read from file done, time = 23.4763(s)

Sum done, time = 0.083389(s)

Schedule done, time = 0.646846(s)

Move done, time = 2.14508(s)

Fuse done, time = 0.287428(s)

Fuse done, time = 0.356758(s)
3.51962
wiki-Vote_row_major.mtx
Size of the matrix: 8297 8297 103689

Read from file done, time = 0.052644(s)

Sum done, time = 0.00021(s)

Schedule done, time = 0.001081(s)

Move done, time = 0.001899(s)

Fuse done, time = 0.000588(s)

Fuse done, time = 0.000657(s)
0.00446987
email-Eu-core_row_major.mtx
Size of the matrix: 1005 1005 25571

Read from file done, time = 0.017535(s)

Sum done, time = 0.000104(s)

Schedule done, time = 0.000174(s)

Move done, time = 0.000424(s)

Fuse done, time = 0.000157(s)

Fuse done, time = 0.000164(s)
0.00105906
nemeth21_row_major.mtx
Size of the matrix: 9506 9506 591626

Read from file done, time = 0.326929(s)

Sum done, time = 0.000908(s)

Schedule done, time = 0.0025(s)

Move done, time = 0.009191(s)

Fuse done, time = 0.002565(s)

Fuse done, time = 0.0027(s)
0.017885
crystm02_row_major.mtx
Size of the matrix: 13965 13965 168435

Read from file done, time = 0.105582(s)

Sum done, time = 0.000329(s)

Schedule done, time = 0.001547(s)

Move done, time = 0.002845(s)

Fuse done, time = 0.000936(s)

Fuse done, time = 0.001025(s)
0.00670791
cant_row_major.mtx
Size of the matrix: 62451 62451 2034917

Read from file done, time = 1.01595(s)

Sum done, time = 0.003124(s)

Schedule done, time = 0.012889(s)

Move done, time = 0.040015(s)

Fuse done, time = 0.008536(s)

Fuse done, time = 0.009616(s)
0.074214
ML_Laplace_row_major.mtx
Size of the matrix: 377002 377002 27689972

Read from file done, time = 12.4771(s)

Sum done, time = 0.042141(s)

Schedule done, time = 0.166592(s)

Move done, time = 0.662296(s)

Fuse done, time = 0.117457(s)

Fuse done, time = 0.125776(s)
1.11437
Transport_row_major.mtx
Size of the matrix: 1602111 1602111 23500731

Read from file done, time = 11.0639(s)

Sum done, time = 0.036945(s)

Schedule done, time = 0.207547(s)

Move done, time = 0.848522(s)

Fuse done, time = 0.103247(s)

Fuse done, time = 0.106751(s)
1.30312
TSOPF_RS_b2383_row_major.mtx
Size of the matrix: 38120 38120 16171169

Read from file done, time = 7.13491(s)

Sum done, time = 0.024517(s)

Schedule done, time = 0.085628(s)

Move done, time = 0.270983(s)

Fuse done, time = 0.069645(s)

Fuse done, time = 0.072007(s)
0.522833
chem_master1_row_major.mtx
Size of the matrix: 40401 40401 201201

Read from file done, time = 0.119561(s)

Sum done, time = 0.00039(s)

Schedule done, time = 0.002867(s)

Move done, time = 0.003933(s)

Fuse done, time = 0.001109(s)

Fuse done, time = 0.001207(s)
0.00954485
majorbasis_row_major.mtx
Size of the matrix: 160000 160000 1750416

Read from file done, time = 0.839045(s)

Sum done, time = 0.002756(s)

Schedule done, time = 0.014406(s)

Move done, time = 0.036031(s)

Fuse done, time = 0.007406(s)

Fuse done, time = 0.007806(s)
0.0684419
shyy161_row_major.mtx
Size of the matrix: 76480 76480 329762

Read from file done, time = 0.153457(s)

Sum done, time = 0.000531(s)

Schedule done, time = 0.004147(s)

Move done, time = 0.005855(s)

Fuse done, time = 0.001438(s)

Fuse done, time = 0.001689(s)
0.0136809
Baumann_row_major.mtx
Size of the matrix: 112211 112211 760631

Read from file done, time = 0.420328(s)

Sum done, time = 0.001153(s)

Schedule done, time = 0.008881(s)

Move done, time = 0.014495(s)

Fuse done, time = 0.0033(s)

Fuse done, time = 0.003596(s)
0.0314491
26 changes: 26 additions & 0 deletions evaluation/FormatConversion/results/coo_to_dia.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
chem_master1_row_major.mtx
Size of the matrix: 40401 40401 201201
Need to have 5 vectors
0.00416493
Enter the check function
Check Success
majorbasis_row_major.mtx
Size of the matrix: 160000 160000 1750416
Need to have 22 vectors
0.0351272
Enter the check function
Check Success
shyy161_row_major.mtx
Size of the matrix: 76480 76480 329762
Need to have 7 vectors
0.00670195
Enter the check function
Check Success
Baumann_row_major.mtx
Size of the matrix: 112211 112211 760631
Need to have 7 vectors
0.0129969
Enter the check function
Check Failed
coo_to_dia_4: /work/shared/users/staff/zz546/Sparse_Layout_Dialect/lib/Runtime/SparlayUtils.cpp:2092: void _mlir_ciface_sptCheck(void*, void*): Assertion `0' failed.
Aborted (core dumped)
Loading

0 comments on commit ebb839e

Please sign in to comment.