Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibylau committed May 9, 2024
1 parent 287a77a commit 7671df3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,26 @@ We provide two ways to install UniSparse:
- Build from source. We provide a bash script that builds LLVM/MLIR and UniSparse to your local environment. Note that it requires 11GB memory space.
### Docker
We first pull a docker image from dockerhub:
`$docker pull sibylau/mlir-llvm:oopsla24-ae`
```
$docker pull sibylau/mlir-llvm:oopsla24-ae
```
Note that this docker image is 14.5GB and it may take time to download it.
Then we run a container from this docker image:
`$ docker run -it --entrypoint bash sibylau/mlir-llvm:oopsla24-ae`
```
$ docker run -it --entrypoint bash sibylau/mlir-llvm:oopsla24-ae
```
Inside this container, we install UniSparse:
`$ git clone https://github.com/cornell-zhang/UniSparse.git -b oopsla24-ae`
```
$ git clone https://github.com/cornell-zhang/UniSparse.git -b oopsla24-ae
```
Source the bash file under the UniSparse project directory path:
`$ cd UniSparse && source script/build.sh`
```
$ cd UniSparse && source script/build.sh
```
Please also export environment variable
`$ export LD_LIBRARY_PATH=/install/taco/build/lib:$LD_LIBRARY_PATH`
```
$ export LD_LIBRARY_PATH=/install/taco/build/lib:$LD_LIBRARY_PATH
```

For a test run, generate sparse kernels and run them via `$cd evaluation/KernelGeneration && bash run.sh`.

Expand All @@ -32,10 +42,10 @@ For a test run, generate sparse kernels and run them via `$cd evaluation/KernelG

Please clone the UniSparse repo, and declare your own Eigen, LLVM and UniSparse projects root path:
```
$ git clone https://github.com/cornell-zhang/UniSparse.git
$ export EIGEN_PATH=$YOUR_EIGEN_PATH
$ export LLVM_PATH=$YOUR_LLVM_PATH
$ export UNISPARSE_PATH=$YOUR_UNISPARSE_PATH
$ git clone https://github.com/cornell-zhang/UniSparse.git $UNISPARSE_PATH/UniSparse
```
and then source the `install.sh` script.
```
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz -P $EI
cd $EIGEN_PATH && tar -xzf eigen-3.4.0.tar.gz

## Install LLVM/MLIR
git clone --depth 1 --branch llvmorg-15.0.0 https://github.com/llvm/llvm-project.git
git clone --depth 1 --branch llvmorg-15.0.0 https://github.com/llvm/llvm-project.git $LLVM_PATH/llvm-project
mkdir -p $LLVM_PATH/llvm_project/build && cd $LLVM_PATH/llvm_project/build
cmake ../llvm -DLLVM_ENABLE_PROJECTS="clang;lld;mlir" \
-DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD="host;NVPTX" \
Expand Down

0 comments on commit 7671df3

Please sign in to comment.