Skip to content

Commit

Permalink
[thirdparty] Add OpenCV as thirdparty dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghb97 committed Mar 17, 2023
1 parent 9f23d02 commit 3f61bc8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "thirdparty/opencv"]
path = thirdparty/opencv
url = https://github.com/opencv/opencv.git
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ Clone the project:
$ git clone [email protected]:buddy-compiler/buddy-benchmark.git
```

## Choose and Build Dependencies

### Choose Submodules

```
$ git submodule update --init
```

### Build OpenCV

```
$ cd buddy-benchmark/thirdparty/opencv
$ mkdir build && cd build
$ cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release
$ ninja
```

## Image Processing Benchmark

Currently, the image processing benchmark includes the following frameworks or optimizers:
Expand Down Expand Up @@ -74,10 +91,12 @@ $ cd bin && ./image-processing-benchmark <image path> <kernel name> <kernelmorph

```
$ cd buddy-benchmark
$ git lfs pull
$ mkdir build && cd build
$ cmake -G Ninja .. \
-DDEEP_LEARNING_BENCHMARKS=ON \
-DOpenCV_DIR=/PATH/TO/OPENCV/BUILD/ \
-DCMAKE_BUILD_TYPE=RELEASE \
-DOpenCV_DIR=$PWD/../thirdparty/opencv/build/ \
-DBUDDY_MLIR_BUILD_DIR=/PATH/TO/BUDDY-MLIR/BUILD/
$ ninja
```
Expand Down
1 change: 1 addition & 0 deletions thirdparty/opencv
Submodule opencv added at ccbc78

0 comments on commit 3f61bc8

Please sign in to comment.